Add support for events, listeners, and dispatchers#64
Open
JoelAlphonso wants to merge 92 commits intomainfrom
Open
Add support for events, listeners, and dispatchers#64JoelAlphonso wants to merge 92 commits intomainfrom
JoelAlphonso wants to merge 92 commits intomainfrom
Conversation
mcaskill
requested changes
Sep 12, 2022
packages/app/src/Charcoal/App/ServiceProvider/AppServiceProvider.php
Outdated
Show resolved
Hide resolved
packages/property/src/Charcoal/Property/Event/PropertyEvent.php
Outdated
Show resolved
Hide resolved
64b146f to
48006be
Compare
mcaskill
requested changes
Sep 14, 2022
Collaborator
mcaskill
left a comment
There was a problem hiding this comment.
Hard-coded references to the cache and www directories should be replaced with paths in This should use AppConfig.
For the Static Website, the static directory path should be defined from a configuration option (something like static_website.path or whatever matches similar options for Cache, View, and Metadata options).
I'm unfamiliar with the Static Website feature, what's the difference between cache/static and www/static?
packages/admin/src/Charcoal/Admin/Script/Translation/TranslateScript.php
Show resolved
Hide resolved
packages/app/tests/Charcoal/App/ServiceProvider/FilesystemServiceProviderTest.php
Outdated
Show resolved
Hide resolved
4981649 to
6e38d70
Compare
mcaskill
requested changes
Sep 20, 2022
packages/app/src/Charcoal/App/ServiceProvider/EventServiceProvider.php
Outdated
Show resolved
Hide resolved
packages/app/src/Charcoal/App/ServiceProvider/EventServiceProvider.php
Outdated
Show resolved
Hide resolved
packages/app/src/Charcoal/App/ServiceProvider/EventServiceProvider.php
Outdated
Show resolved
Hide resolved
mcaskill
requested changes
Sep 20, 2022
packages/event/src/Charcoal/Event/ServiceProvider/EventServiceProvider.php
Show resolved
Hide resolved
packages/event/src/Charcoal/Event/ServiceProvider/EventServiceProvider.php
Outdated
Show resolved
Hide resolved
packages/event/src/Charcoal/Event/ServiceProvider/EventServiceProvider.php
Outdated
Show resolved
Hide resolved
packages/event/src/Charcoal/Event/ServiceProvider/EventServiceProvider.php
Outdated
Show resolved
Hide resolved
packages/event/src/Charcoal/Event/ServiceProvider/EventServiceProvider.php
Outdated
Show resolved
Hide resolved
mcaskill
reviewed
Sep 22, 2022
Collaborator
mcaskill
left a comment
There was a problem hiding this comment.
For the Object events, should we use Model instead?
mcaskill
approved these changes
Sep 22, 2022
e56a5cb to
78b8f03
Compare
mcaskill
requested changes
Sep 22, 2022
mcaskill
approved these changes
Sep 23, 2022
mcaskill
requested changes
Nov 3, 2022
packages/event/src/Charcoal/Event/InterruptableEventInterface.php
Outdated
Show resolved
Hide resolved
mcaskill
requested changes
Nov 3, 2022
2a4bc4b to
ab03bdc
Compare
mcaskill
approved these changes
Nov 4, 2022
mducharme
approved these changes
Nov 8, 2022
71430ec to
a8f639c
Compare
mcaskill
requested changes
Nov 8, 2022
packages/admin/src/Charcoal/Admin/Action/ElfinderConnectorAction.php
Outdated
Show resolved
Hide resolved
…nts with a mean to interrupt the event chain and provide a reason for it
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
- add a simple bootstrapping mechanic - add Facade - add Event Facade
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
Co-authored-by: Chauncey McAskill <chauncey@locomotive.ca>
…ions, event and facade
e62ebff to
d20153e
Compare
Changed: - Replaced ArrayAccess with Pimple Container as resolver for stricter binding and future transition to PSR-11. - Added missing types `void` and `object` to various methods. - Moved `RuntimeException` if instance is not an object from `__callStatic()` to `resolveFacadeInstance`
Moved anonymous function on "upload.presave" event to a method, `dispatchEventOnUploadPreSave`, for easier customization.
veve40
reviewed
Nov 18, 2022
veve40
reviewed
Nov 18, 2022
veve40
reviewed
Nov 18, 2022
packages/object/src/Charcoal/Object/RevisionServiceProvider.php
Outdated
Show resolved
Hide resolved
veve40
reviewed
Nov 18, 2022
veve40
reviewed
Nov 18, 2022
packages/admin/src/Charcoal/Admin/Action/Object/UpdateAction.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Xavier Aymond <xavier.aymond@hotmail.fr>
Despite `$pimple` being the correct parameter name [1], using `$container` falls in line with all other occurrences in service providers and elsewhere. The inconsistent parameter can pose problems with PHP 8's named arguments and for static analysis tools like PHPStan and Psalm which will flag this as an error. This can be corrected in a future changeset that replaces all type-hints of Pimple's Container with the PSR-11 Container interface. [1]: https://github.com/silexphp/Pimple/blob/v3.5.0/src/Pimple/ServiceProviderInterface.php#L43 Co-authored-by: Xavier Aymond <xavier.aymond@hotmail.fr>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Provide
league\event\dispatcheras a pimple container dependency inapppackageChanges
Features
league/event(258be3f)pre-saveandsaveevent for ImageProperty (2a03032)propertiesandpropertyBlacklistoptions for Revisions (baafa78)Bug Fixes
eventpackage (3d9c4a2)app/(a8f639c)Todo
RevisionServiceProviderfromAppServiceProvidertoAdminServiceProviderand the charcoal/boilerplate's service provider.