Skip to content
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

Feature/plugin autoload #60

Merged
merged 2 commits into from
Oct 8, 2024
Merged

Feature/plugin autoload #60

merged 2 commits into from
Oct 8, 2024

Conversation

mateikki
Copy link
Member

@mateikki mateikki commented Feb 15, 2024

Autoload

Dugo očekivani autoload dolazi u naš starter plugin. Zaboravimo definiranje dependencya ručno unutar metode load_dependencies u klasi plugin, koliko puta nam se dogodilo da zaboravimo tamo ubaciti dependency a dodali smo novi servis koji nas rješava svih problema ??

Ok, šalu na stranu, u ovom PR-u dolaze neke promjene koje postavljaju temelje za budućnost (kad nam dolazi DI u plugin, i s tim mogućnost unit-testiranja servisa i svih ostalih čudesa korištenjem mockova). Pa evo što je sve tu napravljeno:

  • namespaceovi su prilagođeni strukturi foldera unutar plugina (da bi autoload bio moguć)
  • izmijenjena je logika učitavanja plugina (prvo učitavamo autoload.php iz vendora - jer nema razloga da ovo ne uradimo)
  • pojednostavljeni pozivi aktivatora/deaktivatora na register/unregister hookove
  • dodana autoload funkcija koja preko namespacea pronalazi traženi file u strukturi foldera (pošto imamo zadane načine imenovanja klasa i interfaceova - autoload traitova još nemamo).

@mateikki mateikki self-assigned this Feb 15, 2024
@mateikki mateikki requested a review from fmarencic February 15, 2024 17:34
@mateikki mateikki added the feature New feature or request label Feb 15, 2024
@mateikki mateikki added this to the Starter V2 milestone Feb 15, 2024
@fmarencic
Copy link
Member

@mateikki jel možeš mergat master u taj branch? Zatvorio sam WP update PR pa ce nestat ove izmjene. Ne mogu nikako pogledat PR na githubu jer sve sinkrono loada u Reviewu, svih 4k fajlova i sve šteka.

@mateikki
Copy link
Member Author

mateikki commented Oct 7, 2024

@fmarencic evo ga sad sam maknuo pa je ostalo samo ovo. Napravio sam i DI PR, pa kad ovaj mrđamo ubacit ću i taj.

@mateikki mateikki merged commit eaabfb3 into master Oct 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants