Top 6 PHP Component Projects
-
Project mention: Bouncer - An extensible validation library for your data with sane defaults. | reddit.com/r/PHP | 2022-02-22
You're welcome :) Well, I could think of many scenarios such zipcode, uuids, etc, that represent world information per-se, also in circunstances where you should validate fields that depend on others, or even when tangling with regex validation. You could check Respect/Validation out (https://github.com/Respect/Validation) that does something similar or Rakit/Validation (https://github.com/rakit/validation). They present a nice API to work with and a structure closer to yours.
-
You can find the PR here: https://github.com/symfony/symfony-docs/pull/13597
-
SonarQube
Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
-
If you want some inspiration try to look at the packages released by the PHP League. They are of very high quality and usable across multiple projects.
-
flynt
Component based WordPress starter theme, powered by ACF Pro and Timber, optimized for a11y and fast page load results. (by flyntwp)
The underlying problem I see that Tailwind solves is component-izing a single idea. It does that pretty well. You can point to a single stack of code and say "this one thing is a navbar" and it's easy to know where to make changes. No searching, no stress.
What I haven't seen Tailwind do well on my projects is respond to change in the same way other methods would. I'm not saying it isn't possible, just that the several projects I've seen, it was a big pain.
A method I've been quite fond of to accomplish the same task, but remove the difficulties this author's other posts articulate, is to recreate the concept of a component in a single folder. Much like you would a Vue single-file component. If you read the "Components" heading here you'll get a good feel for it by looking at the folder/file structure:
* https://github.com/flyntwp/flynt#components
That same idea I've enabled in a framework/language-agnostic way with an NPM module I created (not public). It watches the folder, namespaces everything like a single-file Vue component (using a manifest name or defaults to the folder name), and with a bit of config you can even do intelligent vendor/tree-shaking across all components and themes. You can even have components inherit theme sass/js files.
This solution is nice because devs get the "one source of editing" in a single folder, it's performant, and it's agnostic to language/frameworks. Point to a folder of components, specify a dist folder, and you're done unless you want to modify config. Parallel execution of all components being built, it's also fast!
I'm only saying all of this because I'm curious if there are Tailwind users out there that could teach me if Tailwind solves other problems I'm not seeing. Oor if this type of solution would be something I should open source. It ends up being a pretty simple Webpack file under the hood.
-
PoP
Monorepo of the PoP project, including: a server-side component model in PHP, a GraphQL server, a GraphQL API plugin for WordPress, and a website builder (by leoloso)
My project is this one: https://github.com/leoloso/PoP. This all belongs to the "Site Builder" layer, which is a work in progress. I don't know when I'll have it ready though (I'm currently working on the GraphQL server for WP layer, once I'm done there I'll move on to the Site Builder).
-
Project mention: Convoy: Declare routes inside Laravel Livewire components. | reddit.com/r/laravel | 2022-03-25
PHP Components related posts
- Creating a "module" with OO PHP
- Using yoda condition in Twig templates
- 💁🏻♀️ I wrote about why my PHP project needs a monorepo, and how I optimized it for GitHub Actions
- Asynchronous PHP — Multiprocessing, Multithreading & Coroutines - Diving Laravel
- Plugin to add persisted GraphQL queries to WordPress
- Designing a GraphQL server with components, not graphs!
Index
What are some of the best open-source Component projects in PHP? This list will help you:
Project | Stars | |
---|---|---|
1 | Respect Validation | 5,531 |
2 | Symfony2 Components | 1,977 |
3 | League of Extraordinary Packages | 1,181 |
4 | flynt | 469 |
5 | PoP | 240 |
6 | convoy | 15 |
Are you hiring? Post a new remote job listing for free.