Git Product home page Git Product logo

totem's Introduction

Wisembly

This repo is the code of wisembly website, made on top of Wisembly silexCMS.

Install

  • clone repository

git clone git://github.com/Wisembly/wisembly.git

  • initialise submodules (Twitter bootstrap, jQuery..)

git submodule update --init

  • get composer

  • install vendors

php composer.php install

  • duplicate every .dist file in app/config/, web/fr|en/ and tweak them as need

  • import bin/database_structure.sql

That's it!

Licence

MIT Licence

Authors

  • @nicolaschenet
  • @arcanis
  • @guillaumepotier

totem's People

Contributors

guillaumepotier avatar juliengrelet avatar marko-ilic avatar morliaguet avatar taluu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

totem's Issues

Deep snapshot

Currently, if there is an object in the properties of an object, only the sha1 will be compared (meaning that only a new object instead of the old one, not the modified one, will be compared to the old one).

The problem lies within the fact that the object is not copied, but is a reference since php5 :

<?php

class Foo {
     public $bar = 'baz';
}

$foo = new Foo;

$bar = $foo;

$foo->bar = 'fubar';

var_dump($foo->bar, $bar->bar); // will dump fubar fubar

But I also can't clone the object if it is an object, because the sha1 will differ from one clone to another, considering it to be a whole new object altogether.

I think I should check if i should, in the data generated by the snapshots, store the value into a value object setting also the type, transforming it into something I may understand... (like an object snapshot, or whatever).

Switch to PSR-4

This is more sexy than the PSR-0. And also more maintainable, but that is another point. :)

Verify types between old / new snapshots before the switch

If we try to compare a ArraySnapshot or ObjectSnapshot with a null key in the new key, it bugs with a bad argument exception on AbstractSnapshot::isComparable.

I should restore the previous behaviour which checked the new and old keys in the Set class.

Introduce a `Snapshotter`

Which wold be used to snapshot data with a notion of priority. This would remove the call to any normalize in built-in snapshots and thus remove this method for the AbstractSnapshot.

As this may be a BC Break, I'm tagging this for 2.0.

Added / Changed / Removed properties

Instead of only see what has changed, i should soften up the Set to also accept different array sizes when computing the changeset, so it shows what has added and removed.

Just opening an issue so that I can check it up later. Any comments on how I should proceed are welcome.

[Collection] Use PropertyPath

As Symfony's ProperyAccess was integrated with the CollectionSnapshot (cf #22), and as in a collection the whole objets should look alike (collection of objects, of arrays, ...), we should not try to modify the primary parameter.

If the snapshot is used with a collection of arrays, then we should either have a PropertyPath directly fed to the pkey argument, or a valid property path either way [key]. If it is a collection of objects, then either a PropertyPath object, either a key path.

This should be way more flexible than it actually is right now, instead of doing a wild guess depending on the types of each elements fed into the collection, which could be wrong.

Get rid of the "raw data"

The raw data which is set in the AbstractSnapshot can be wrong.

Example : on objects, it may return the new state (references, etc) instead of the state it was when it was snapshotted.

I added this property in order to be able to act on the real data if I ever needed it, like on the diff. I should try to find another way to do that, without really relying on the "raw state".

Use a SetObject injection rather than SetClass

I'm not a huge fan to inject a setClass into the AbstractSnapshot. I think it should be a SetInterface object, as an DIC would like to have.

Just writing this issue to think about that later.

SetBuilder in Snapshots

Allow to use a different Set (an extension, or something like that) in the built-in snapshots rather than only the built-in Set.

Currently, if you want to use something else, you have to reimplement the diff method of AbstractSnapshot... Even if all it does is just changing the class used.

Bump php version

Because 5.4 is now EOL for a while. Should bump to 5.6 (.. or 7 ?). As we are trying to stick close to [http://semver.org](Semantic Versionning), this should be considered on next major bump ("version 2.0")

Add a ChangeInterface

To allow to customize even further the other classes that could need some of the AbstractChange capabilities... Without extending it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.