• Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language
    PHP
  • Created almost 10 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Stupid PHP library to do very simple persistance for test automation purposes

Persisted Objects

This repository is a collection of repositories (pun intended) that somebody might find useful in training or testing exercises. They provide an easy way to create Fakes for your repositories in the test infrastructure.

Why?

As stated in the header - for testing and demo purposes. These repos are optimised for cases where you have less than 20 records in your repository and there's always only one user accessing it at a time. In these particular cases these repositories are faster. But in every other instance they're exponentially not.

Usage

Install with:

$> composer require --dev everzet/persisted-objects

Use like this:

$repo = new FileRepository(TEMP_FILE, new AccessorObjectIdentifier('getId'));
$repo->save($user);

$user === $repo->findById($user->getId());

$repo->clear();

or like this:

$repo = new InMemoryRepository(new CallbackObjectIdentifier(
    function($obj) { return $obj->getFirstname() . $obj->getLastname(); }
);
$repo->save($user);

$user === $repo->findById($user->getFirstname() . $user->getLastname());

$repo->clear();

More Repositories

1

capifony

[UNMAINTAINED]
Ruby
727
star
2

jade.php

HAML-like template engine for PHP 5.3 & Symfony2
PHP
442
star
3

metronome

Business analysis tool for your codebase
JavaScript
61
star
4

fullstack-bdd-sflive2012

Fullstack BDD in Symfony2 demo
PHP
48
star
5

sfLESSPlugin

less.js in symfony
PHP
27
star
6

basket-by-example

17
star
7

sylius-docker

11
star
8

sfc11

The demo project from sfCampUA 11 training (i18n v2, correct file uploads and twig)
PHP
11
star
9

behat-shared-helpers-example

Example of using Behat with helper services shared across contexts
PHP
11
star
10

sfLessPhpPlugin

LESS in symfony
PHP
10
star
11

silex-mink

Example project showing Mink usage in Silex project
JavaScript
8
star
12

sfDoctrine-tmbundle

Doctrine TextMate bundle with full support of DQL & schema snippets (including all column types).
8
star
13

sfSymfony-tmbundle

symfony TextMate bundle with over 350 snippets & CLI GUI.
JavaScript
8
star
14

sfHAMLPlugin

HAML templates in symfony
PHP
7
star
15

sfPHP-tmbundle

Basic PHP TextMate bundle, that follows symfony coding style guides & implements context guessers for symfony, Doctrine & Propel.
PHP
5
star
16

Latte

unfinished (has some minor bugs, missing features and not-working sync) Remember The Milk client for Mac OS X
Objective-C
4
star
17

vim-indexer

MIRROR of http://www.vim.org/scripts/script.php?script_id=3221 plugin
Vim Script
3
star
18

dotfiles

everzet (life|work) dotfiles
Lua
3
star
19

laraconeu15-shop

Laracon EU 2015 workshop project
Gherkin
3
star
20

sfGravatar2Plugin

Gravatar plugin for symfony 1.4 with https & image type support
PHP
3
star
21

EZMilk

Remember The Milk API wrapper for ObjectiveC
Objective-C
2
star
22

dates

Over-simplistic Dates library for PHP. Used in presentations and demos
PHP
2
star
23

sfDoctrineObjectGuardPlugin

Authorization object guard plugin for symfony 1.4
PHP
2
star
24

sfOpenIDConsumerPlugin

OpenID consumer plugin for symfony
PHP
2
star
25

everzet.com

Source code for new version of my personal website and blog
JavaScript
1
star
26

sfCSSNakedDayPlugin

symfony 1.4 CSS Naked Day support for your projects
PHP
1
star
27

EZSQLite

SQLite wrapper/binder for the ObjectiveC
Objective-C
1
star