-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] 1.0 release #183
Closed
[WIP] 1.0 release #183
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
5324b5a
Started to integrate propel [WIP]
K-Phoen db36ffc
Use the PropertyAccess component to manipulate objects
K-Phoen ffb7ad9
Cleaned a bit the configuration definition
K-Phoen f81d091
Fixed dependency constraint
K-Phoen 06a8dfb
Fixed a few typos
K-Phoen 8746f74
Added a few tests for the PropelAdapter class
K-Phoen e079f40
Updated FileInjectorTest
K-Phoen c95e9e1
Updated PropertyMapping tests
K-Phoen 88b23bc
Updated DoctrineUploaderListener tests
K-Phoen 5a52771
Updated Tests/Storage/FileSystemStorageTest.php
K-Phoen 9355d10
Fixed GaufretteStorage test
K-Phoen 6db07b5
Little cs fix
K-Phoen 8f99e26
Renamed MappingReader to MetadataReader
K-Phoen 70c5fc4
Cleaned adapters definition
K-Phoen 695eaaa
Fixed a few typos
K-Phoen ac9c4d8
Moar cs fixes
K-Phoen 2b847f6
Added a few tests for the PropelUploader listener
K-Phoen 51ef775
Fixed doctrine related listeners
K-Phoen 8f78254
Updated propel event dispatcher dependency dependency
K-Phoen 4ecaab6
Reduced the coupling with reflection objects
K-Phoen 2382acf
File namers should use PropertyMapping instances instead of relying o…
K-Phoen d2edc2d
Cleaned last usages of Reflection in adapters as they now are useless
K-Phoen 0867935
Allow older versions of the PropertyAccess component
K-Phoen dee3819
Fixed namespace for Naming testcases
K-Phoen adc3094
Fixed phpunit config file
K-Phoen 8df8920
Started to work on the testsuite (less code, more meaningfull tests a…
K-Phoen 1a26339
Fixed tests due to rebase
K-Phoen 8538aca
Cleaned a bit more the FileSystemStorage test
K-Phoen c3cf0a8
Fixed the FileInjector tests so that the filesystem isn't impacted an…
K-Phoen b939d47
Fixed a few checkstyles
K-Phoen 74967ab
Cleaned a bit the PropertyMappingFactory test
K-Phoen f79203c
Cleaned the DoctrineUploaderListener test
K-Phoen ef882a7
Worked on the DirectoryNamers
K-Phoen 667ef48
Fixed tests for new DirectoryNamer implementation
K-Phoen b5baacc
Removed unused var in FileSystemStorage test
K-Phoen 40d6ff0
Added a Xml driver
K-Phoen 9ed7515
First full event-based implementation
K-Phoen 19f1a6a
Cleaned MongoDBAdapter test
K-Phoen 1e2f81d
Few fixes
K-Phoen bb63daf
Started to fix tests
K-Phoen 9ba7bed
Deleted useless methods from PropertyMapping
K-Phoen 6467b5a
Introduced a CachedPropertyMappingFactory class
K-Phoen 46b7a1a
Fixed event listeners tests
K-Phoen ff066a1
Removed useless else statements
K-Phoen 8ae1a5d
Renamed drivers
K-Phoen 030c794
Added missing check in PropertyMappingFactory
K-Phoen 6d2ce00
Fixed propel compiler pass
K-Phoen 8500f0e
Added tests for the UploadHandler
K-Phoen fa652ef
Cleaned a bit adapters tests
K-Phoen 400fd9e
Renamed UploadHandler methods
K-Phoen 98c3e3c
Renamed FileInjector::injectFiles method to injectFile
K-Phoen aef9ed9
Gave a more precise version constraint for Propel
K-Phoen 89efe45
Raised the minimum symfony version to 2.1
K-Phoen 335aaf6
Added myself to the authors
K-Phoen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace Vich\UploaderBundle\Adapter\Propel; | ||
|
||
use Vich\UploaderBundle\Adapter\AdapterInterface; | ||
|
||
/** | ||
* Propel adapter. | ||
* | ||
* @author Kévin Gomez <[email protected]> | ||
*/ | ||
class PropelAdapter implements AdapterInterface | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getObjectFromEvent($event) | ||
{ | ||
return $event->getSubject(); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function recomputeChangeSet($event) | ||
{ | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getClassName($object) | ||
{ | ||
return get_class($object); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
DependencyInjection/CompilerPass/RegisterPropelModelsPass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace Vich\UploaderBundle\DependencyInjection\CompilerPass; | ||
|
||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
|
||
/** | ||
* Register the uploadable models in BazingaPropelEventDispatcherBundle | ||
* | ||
* @author Kévin Gomez <[email protected]> | ||
*/ | ||
class RegisterPropelModelsPass implements CompilerPassInterface | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function process(ContainerBuilder $container) | ||
{ | ||
if ($container->getParameter('vich_uploader.driver') !== 'propel') { | ||
return; | ||
} | ||
|
||
$metadata = $container->get('vich_uploader.metadata_reader'); | ||
$classes = $metadata->getUploadableClasses(); | ||
|
||
foreach ($container->findTaggedServiceIds('vich_uploader.listener') as $id => $attributes) { | ||
$listener = $container->getDefinition($id); | ||
$listener->setClass($container->getDefinition($listener->getParent())->getClass()); | ||
$listener->setPublic(true); | ||
|
||
foreach ($classes as $class) { | ||
$listener->addTag('propel.event_subscriber', array( | ||
'class' => $class | ||
)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace
odm
tomongodb
. Doctrine has 3odm
projects.