-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add support for events, listeners, and dispatchers #64
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
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
Outdated
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
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
packages/object/src/Charcoal/Object/GenerateRevisionListener.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 <[email protected]>
- add a simple bootstrapping mechanic - add Facade - add Event Facade
Co-authored-by: Chauncey McAskill <[email protected]>
Co-authored-by: Chauncey McAskill <[email protected]>
…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 <[email protected]>
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 <[email protected]>
Provide
league\event\dispatcher
as a pimple container dependency inapp
packageChanges
Features
league/event
(258be3f)pre-save
andsave
event for ImageProperty (2a03032)properties
andpropertyBlacklist
options for Revisions (baafa78)Bug Fixes
event
package (3d9c4a2)app/
(a8f639c)Todo
RevisionServiceProvider
fromAppServiceProvider
toAdminServiceProvider
and the charcoal/boilerplate's service provider.