-
Notifications
You must be signed in to change notification settings - Fork 0
Add support for events, listeners, and dispatchers #64
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
base: main
Are you sure you want to change the base?
Conversation
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
left a comment
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.
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
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
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
left a comment
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.
For the Object events, should we use Model instead?
e56a5cb to
78b8f03
Compare
packages/event/src/Charcoal/Event/InterruptableEventInterface.php
Outdated
Show resolved
Hide resolved
2a4bc4b to
ab03bdc
Compare
71430ec to
a8f639c
Compare
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.
packages/object/src/Charcoal/Object/RevisionServiceProvider.php
Outdated
Show resolved
Hide resolved
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>
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.