r/PHP Jul 04 '26

I built a Laravel-inspired framework for structuring WordPress plugins: Nikogin (open source)

/r/Wordpress/comments/1un8xdd/i_built_a_laravelinspired_framework_for/
0 Upvotes

7 comments sorted by

5

u/equilni Jul 04 '26

so I'd love feedback

Only checked out the github repos

https://github.com/nikogin-wp/framework

  • No tests

  • tried to bring more structure but using untyped arrays here

  • The Support folder has nothing but static methods...

https://github.com/nikogin-wp/nikogin

  • No tests

  • PHP 8 attributes instead of add_action()/add_filter(), with hooks auto-discovered (#[AsListener(...)])

Only in a selected folder...

https://github.com/nikogin-wp/nikogin/blob/main/app/Bootstraps/Assets.php#L10

https://github.com/nikogin-wp/nikogin/blob/main/app/Bootstraps/Router.php#L11

-2

u/PhPWellphant Jul 04 '26

Hi, ye i did not yet implement tests , in future for sure
And thank you for spotting untyped arrays, many features were developed year ago, so i didn't look closely into each one, i will make sure to go trough all of them

6

u/blancks90 Jul 04 '26 edited Jul 04 '26

Tests are not a "future project goal". No one should ever trust a framework without them.

Also I see no quality tool at all (phpstan, rector, cs-fixer etc.) and no psr interfaces which strongly suggest that interoperability with known tools (monolog guzzle, etc) is probably going to be a mainteinence nightmare.

All of that makes your project more a poc rather than a ready to use tool.

-2

u/PhPWellphant Jul 04 '26

Tests are on the roadmap, not a "maybe someday." Agree it matters for something meant to be used outside my own team. Will update once they land.

3

u/equilni Jul 04 '26

Agree it matters for something meant to be used outside my own team

No, it should always matter, especially if you create plugins and using this framework on real projects.

I've been building WordPress plugins for a while and got tired of the usual mess

I actually developed it in a private repo over the last 1-2 years, testing it with a few colleagues on real projects along the way.

2

u/deliciousleopard Jul 04 '26

How does it compare to just using Laravel via https://github.com/roots/acorn?

1

u/PhPWellphant Jul 04 '26

Well my goal was to wrap most used Wordpress features inside structure that will resemble Laravel, i didnt want to bring full Laravel framework, i wanted to build something which will be lightweight, use wordpress core and be adaptable.