Skip to content
Snippets Groups Projects

improve into wp-hook and some additional unfinished things

Merged Marcin Kolanko requested to merge 1.x into main

Signed-off-by: Bart Jaskulski bjaskulski@protonmail.com

Merge request reports

Approval is optional

Merged by Bartek JaskulskiBartek Jaskulski 9 months ago (Aug 8, 2024 12:45pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 1 <?php
2
3 if ( ! ( PHP_VERSION_ID >= 72000 ) ) {
2 if ( ! ( PHP_VERSION_ID >= 70200 ) ) {
  • Bartek Jaskulski
  • 108 108
    109 109 private function prepare_driver( ContainerInterface $container ): HookDriver {
    110 110 $loader = new CompositeBindingLoader();
    111 foreach ( $this->extensions->bindings( $container ) as $bindings ) {
    112 $loader->add( $bindings );
    113 }
    111 foreach ($this->extensions as $extension) {
  • Bartek Jaskulski
  • 51 52 /**
    52 53 * @param string|null $filename Filename of the booted plugin. May be null, if called from plugin's main file.
    53 54 */
    54 public function boot( string? $filename = null ) {
    55 public function boot( ?string $filename = null ) {
  • Bartek Jaskulski
  • 8 8 use WPDesk\Init\Binding\ComposableBinder;
    9 9 use WPDesk\Init\Binding\StoppableBinder as Stop;
    10 10 use WPDesk\Init\Binding\Definition;
    11 use WPDesk\Init\Binding\Binder as BinderInstance;
    • Czemu z aliasem?

    • bo klasa StoppableBinder znajduje się w przestrzeni nazw WPDesk\Init\Binding\Binder, tak samo jak ta przestrzeń nazw ulokowany jest interfejs Binder którego importujemy poprzez use WPDesk\Init\Binding\Binder. Wcześniej w konstruktorze była podana nieprawidłowa lokalizacja Bindera, konstruktor oczekiwał interfejsu WPDesk\Init\Binding\Binder\Binder co powodowało smród, dlatego żeby się nie pierdzieliło dodałem alias.

    • Please register or sign in to reply
  • added 1 commit

    • 7dea404c - build: fix invalid version constraint

    Compare with previous version

  • Please register or sign in to reply
    Loading