snicco / snicco
The development monorepo of the Snicco project
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 133
Watchers: 2
Forks: 16
Open Issues: 18
Requires
- php: ^7.4|^8.0
- ext-filter: *
- ext-hash: *
- ext-json: *
- ext-mbstring: *
- ext-mysqli: *
- cache/simple-cache-bridge: ^1.2.0
- cache/tag-interop: ^1.1
- cache/taggable-cache: 1.2.0
- codeception/codeception: ^4.1.29
- defuse/php-encryption: ^2.3
- filp/whoops: ^2.14.5
- illuminate/collections: ^8.81
- illuminate/container: ^8.81
- illuminate/contracts: ^8.81
- illuminate/database: ^8.81
- illuminate/events: ^8.81
- illuminate/filesystem: ^8.81
- illuminate/macroable: ^8.81
- illuminate/support: ^8.81
- illuminate/view: ^8.81
- laminas/laminas-httphandlerrunner: ^2.1
- lucatume/wp-browser: ~3.1.4
- middlewares/negotiation: ^2.1.0
- nikic/fast-route: 1.3.0
- nyholm/psr7: ^1.0.0
- nyholm/psr7-server: ^1.0.2
- paragonie/constant_time_encoding: ^2.4
- phpunit/phpunit: ^9.5.13
- pimple/pimple: ^3.5
- psr/cache: ^1.0.0
- psr/container: ^1.1
- psr/event-dispatcher: ^1.0
- psr/http-factory: ^1.0.0
- psr/http-message: ^1.0.0
- psr/http-server-handler: ^1.0.0
- psr/http-server-middleware: ^1.0.0
- psr/log: ^1.1.1
- psr/simple-cache: ^1.0.0
- symfony/browser-kit: ^5.4
- symfony/css-selector: ^5.4
- symfony/dom-crawler: ^5.4.6
- webimpress/safe-writer: ^2.2
- webmozart/assert: ^1.10
Requires (Dev)
- ext-curl: *
- cache/array-adapter: ^1.0.0
- cache/integration-tests: 0.17.0
- codeception/module-cli: ^1.1.1
- cweagans/composer-patches: ^1.7
- fakerphp/faker: ^1.3.0-stable
- guzzlehttp/guzzle: ^7.0.1
- guzzlehttp/psr7: ^2.1
- knplabs/github-api: ^3.0
- laminas/laminas-diactoros: ^2.8
- php-stubs/wordpress-stubs: ^5.9.0
- symfony/finder: ^5.0
- symplify/easy-coding-standard: 10.1.2
- symplify/monorepo-builder: 9.4.70
- vimeo/psalm: 4.22.0
- vlucas/phpdotenv: 5.4.1
- wp-cli/wp-cli: ^2.6
Replaces
- snicco/better-wp-api: v2.0.0-beta.9
- snicco/better-wp-cache: v2.0.0-beta.9
- snicco/better-wp-cache-bundle: v2.0.0-beta.9
- snicco/better-wp-cli: v2.0.0-beta.9
- snicco/better-wp-cli-testing: v2.0.0-beta.9
- snicco/better-wp-hooks: v2.0.0-beta.9
- snicco/better-wp-hooks-bundle: v2.0.0-beta.9
- snicco/better-wp-mail: v2.0.0-beta.9
- snicco/better-wp-mail-bundle: v2.0.0-beta.9
- snicco/better-wp-mail-testing: v2.0.0-beta.9
- snicco/better-wpdb: v2.0.0-beta.9
- snicco/better-wpdb-bundle: v2.0.0-beta.9
- snicco/blade-bridge: v2.0.0-beta.9
- snicco/blade-bundle: v2.0.0-beta.9
- snicco/content-negotiation-middleware: v2.0.0-beta.9
- snicco/debug-bundle: v2.0.0-beta.9
- snicco/default-headers-middleware: v2.0.0-beta.9
- snicco/eloquent: v2.0.0-beta.9
- snicco/encryption-bundle: v2.0.0-beta.9
- snicco/event-dispatcher: v2.0.0-beta.9
- snicco/event-dispatcher-testing: v2.0.0-beta.9
- snicco/guests-only-middleware: v2.0.0-beta.9
- snicco/http-routing: v2.0.0-beta.9
- snicco/http-routing-bundle: v2.0.0-beta.9
- snicco/http-routing-testing: v2.0.0-beta.9
- snicco/https-only-middleware: v2.0.0-beta.9
- snicco/illuminate-container-bridge: v2.0.0-beta.9
- snicco/kernel: v2.0.0-beta.9
- snicco/kernel-testing: v2.0.0-beta.9
- snicco/method-override-middleware: v2.0.0-beta.9
- snicco/minimal-logger: v2.0.0-beta.9
- snicco/must-match-route-middleware: v2.0.0-beta.9
- snicco/no-robots-middleware: v2.0.0-beta.9
- snicco/open-redirect-protection-middleware: v2.0.0-beta.9
- snicco/payload-middleware: v2.0.0-beta.9
- snicco/pimple-bridge: v2.0.0-beta.9
- snicco/psr7-error-handler: v2.0.0-beta.9
- snicco/redirect-middleware: v2.0.0-beta.9
- snicco/session: v2.0.0-beta.9
- snicco/session-bundle: v2.0.0-beta.9
- snicco/session-psr16-bridge: v2.0.0-beta.9
- snicco/session-testing: v2.0.0-beta.9
- snicco/session-wp-bridge: v2.0.0-beta.9
- snicco/share-cookies-middleware: v2.0.0-beta.9
- snicco/signed-url: v2.0.0-beta.9
- snicco/signed-url-psr15-bridge: v2.0.0-beta.9
- snicco/signed-url-psr16-bridge: v2.0.0-beta.9
- snicco/signed-url-testing: v2.0.0-beta.9
- snicco/signed-url-wp-bridge: v2.0.0-beta.9
- snicco/str-arr: v2.0.0-beta.9
- snicco/templating: v2.0.0-beta.9
- snicco/templating-bundle: v2.0.0-beta.9
- snicco/testable-clock: v2.0.0-beta.9
- snicco/testing-bundle: v2.0.0-beta.9
- snicco/trailing-slash-middleware: v2.0.0-beta.9
- snicco/wp-auth-only-middleware: v2.0.0-beta.9
- snicco/wp-capability-middleware: v2.0.0-beta.9
- snicco/wp-guests-only-middleware: v2.0.0-beta.9
- snicco/wp-nonce-middleware: v2.0.0-beta.9
- dev-master
- v2.0.0-beta.9
- v2.0.0-beta.8
- v2.0.0-beta.7
- v2.0.0-beta.6
- v2.0.0-beta.5
- v2.0.0-beta.4
- v2.0.0-beta.3
- v2.0.0-beta.2
- v2.0.0-beta.1
- v1.10.1
- v1.10.0
- v1.9.1
- v1.9.0
- v1.8.1
- v1.8.0
- v1.7.0
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.0
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.0
- v1.2.1
- v1.2.0
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.2
- v1.0.1
- v1.0.0
- dev-beta
This package is auto-updated.
Last update: 2024-11-07 14:51:58 UTC
README
In this development monorepo you'll find many independent packages that will help you to develop testable, maintainable and PSR-compatible enterprise WordPress projects faster than ever before.
All packages in this repo are specifically designed to be usable in distributed WordPress code and are scopable out of the box.
Table of contents
Repository Overview
You can find all packages in the src/Snicco
directory.
Here is a brief overview of the repository: (hint: click the links to go to the dedicated documentation for each package)
Component
This directory contains completely decoupled PHP components that you can use in any WordPress (or any other PHP project) .
- BetterWPAPI: A better way to interacts with WordPress core functions in distributed WordPress packages.
- BetterWPCache: A PSR6/PSR16 implementation using
the
WP_Object_Cache
. Supports cache tagging. - BetterWPCLI: The missing parts to the already awesome WP-CLI.
- BetterWPHooks: The WordPress hook system redesign in 2022. (PSR-14 compliant)
- BetterWPMail: The long overdue upgrade to
the
wp_mail
function. - BetterWPDB: Keeps you safe and sane when working with custom tables in WordPress.
- EventDispatcher: A general purpose, PSR-14 compliant event-dispatcher
that powers
snicco/better-wp-hooks
. - HttpRouting: A blazing fast routing system and PSR7/PSR15 middleware dispatcher based on fast-route. Especially build for usage in legacy software where you don't have 100% control over the request-lifecycle.
- Kernel: A minimal and customizable application bootstrapper.
- Psr7ErrorHandler: A powerful, PSR-7/PSR-3 compliant error-handler.
- Session: A custom session implementation for applications where
$_SESSION
can't be used for various reasons. - SignedURL: A standalone package to generate and validate protected urls.
- StrArr: A zero-dependency,type-safe and psalm-compatible implementation of the illuminate/support string and array helpers.
- Templating: A unified, immutable API for using and combining different template engines.
- TestableClock: Helper classes for testing time-dependent code.
Bridge
This directory contains different implementations for interfaces defined in one of the components.
- Blade: Provides a 100% tested, standalone implementation
of illuminate/view
for
snicco/templating
. - IlluminateContainer: Provides an adapter
for illuminate/container for the usage
with
snicco/kernel
. - Pimple: Provides an adapter
for pimple/pimple for the usage
with
snicco/kernel
. - Session-PSR16: Allows
using
snicco/session
with any PSR16 cache backend. - SessionWP: Allows
using
snicco/session
with a custom table or theWP_Object_Cache
. - SingedURL-PSR15: Provides a PSR15 middleware
for
snicco/signed-url
. - SingedURL-PSR16: Allows using any PSR16 cache as a storage
for
snicco/signed-url
.
Middleware
This directory contains PSR15-Middleware that can be plugged into the snicco/http-routing
component.
- DefaultHeaders: Add custom headers to all outgoing responses.
- HttpsOnly: Redirects HTTP => HTTPS for all requests
- MethodOverride: Allows treating form submissions
as
PUT|PATCH|DELETE
requests. - Negotiation: Performs content and language negotiation
- NoRobots: Disallows search-engines to index the current request path.
- Payload: Transforms JSON (and other) data to plain PHP arrays.
- Redirect: Redirects requests to configured locations.
- ShareCookies: Transforms cookie objects into response headers.
- TrailingSlash: Redirects
/foo/
to/foo
or vice-versa. - WPAuthOnly: Grants access only to authenticated WordPress users.
- WPCapability: Grants access only to WordPress users with the configured capability.
- WPGuestsOnly: Grants access only to guest WordPress users.
- WPNonce: Will solve all your WordPress Nonces problems once and for all.
Bundle
A bundle
is a plugin for the snicco/kernel
component and integrates one or
more components
or bridges to provide out of the box functionality.
While all components can absolutely be used without using the snicco/kernel
component, bundles makes usage and configuration effortless.
- BetterWPCacheBundle
- BetterWPHooksBundle
- BetterWPMailBundle
- BetterWPDBBundle
- BladeBundle
- DebugBundle: Integrates filp/whoops
with
snicco/psr7-error-handler
- EncryptionBundle: A tight integration with the defuse/php-encryption library.
- HttpRoutingBundle
- SessionBundle:
Integrates
snicco/session
,snicco/http-routing
andsnicco/session-wp-bridge
- TemplatingBundle
- TestingBundle: A full-stack testing framework for applications build
with
snicco/kernel
based on codeception/codeception and lucatume/wp-browser.
Testing
This directory contains testing utilities for components. These packages are only meant to be used as development dependencies.
- BetterWPMailTesting: Provides a testable mail transport for usage in tests.
- EventDispatcherTesting: Provides a testable event dispatcher for usage in tests.
- HttpRoutingTesting: Provides utilities to test your custom Middleware.
- KernelTesting: Contains a test case to test custom dependency-injection adapters
- SessionTesting: Contains test cases to test custom session drivers
for
snicco/session
. - SignedUrlTesting: Contains test cases to test custom storage
for
snicco/signed-url
.
Contributing
We've set up a separate document for our contribution guidelines.
Changelog
Our changelog is automatically generated using the wonderful npm package semantic-release.
Security
Please review our security policy on how to securely report vulnerabilities.
License
This project is licensed under the terms of the GNU LGPLv3 unless otherwise specified in the respective LICENSE.md file of each package. See LICENSE.md
Credits
We want to express our special gratitude to:
- @matthiasnoback: For his teachings on PHP package design. It had a lot of influence on how we set up this project.
- @TomasVotruba: For his teachings on managing a PHP monorepo.