Safe
Symfony
Our great sponsors
Safe | Symfony | |
---|---|---|
7 | 151 | |
2,305 | 29,294 | |
0.8% | 0.6% | |
0.6 | 10.0 | |
7 days ago | 6 days ago | |
PHP | PHP | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Safe
-
PHP libraries and tools
thecodingmachine/safe: All PHP functions, rewritten to throw exceptions instead of returning false
-
Oh boy here we go again…
There are workarounds with some third party libraries, but yeah, it's a pain.
- Which inconsistences of PHP annoy you the most?
-
Any ideas about why json_encode would return empty for a request on local dev, but not empty on server?
- try not to use the built-in json_encode, as it doesnt have proper error handling. Use instead this: https://github.com/thecodingmachine/safe and Safe\json_encode()
-
Native defer & errdefer
Not what you asked for, in modern codebases it's advised to use things like https://github.com/thecodingmachine/safe
-
Use namespaced functions to replace native functions - github.com/rezen/proxyz
The goal of https://github.com/thecodingmachine/safe is different than proxyz. My goal is a method proxy that allows you to override or watch the behaviour of a function from the "global namespace" effortlessly.
-
preg_last_error() and json_last_error()
Safe-PHP redeclares all core PHP functions (in a new namespace) to throw exceptions properly. I use this on almost every project now.
Symfony
-
Using interfaces the wrong way
Let's have a look at the class EventSourceHttpClient and try to use it in Symfony\Component\Webhook\Server\Transport. It's an entirely hypothetical example to illustrate the point.
-
Top 12 PHP Frameworks For Web Development in 2024
Symfony is an open-source PHP framework developed by SensioLabs which has a thriving community of over 300,000 developers with 29k stars and 9.4k forks on GitHub. It provides a set of reusable PHP components and a development methodology for building complex and scalable web applications. It is recommended due to its advanced features and user-friendly environment. The user can also develop microservices.
-
Performance benchmark of PHP runtimes
Symfony 7
-
Show HN: Mutable.ai – Turn your codebase into a Wiki
Would be great to see for https://github.com/symfony/symfony, thanks! As that's a monorepo it may provide a challenge to the tool.
-
Shopware Changes since the 6.0 Dev Training Videos
As Shopware is mostly based on the Symfony framework, which is in turn based on the PHP language, we should also consider learning about the basics, which will also be useful for other frameworks apart from Shopware, like Symfonycasts, symfony.com, php.net.
-
is there an easy way to create a safe login page against SQL injection?
Use PHP frameworks such as Symfony. It cares about all the stuff.
-
Acquia, My Drupal Startup
Symfony is a PHP framework. https://symfony.com/
It caused much of the internal of Drupal to be re-written. This included how it was extended. With previous major versions you learned about new features and APIs. They followed mostly existing design patterns so it was easy to learn and updates your extensions for. With Symfony you had to learn whole new systems and ways of doing things. It was like learning something entirely new. And, porting extensions to it was far more work and time.
Also, the updates made Drupal slower while consuming far more system resources for the same thing. This increased costs to operate.
-
Clean controllers in Symfony (III): request handling
Internally, the kernel executes a controller, that is a callable, passing it an array of arguments. For each of these arguments, Symfony calculates its value using services that implement the ValueResolverInterface1.
-
Drupal 10.1 On OpenBSD 7.3: Install with Composer
Drupal is one of the content management systems aka CMS. It has long history and good stability, which is based on PHP and Symfony.
- Symfony 7.0 Type Declarations: Requesting Feedback from the Community
What are some alternatives?
PHP Dotenv - Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
PHPMailer - The classic email sending library for PHP
Symfony VarDumper - Provides mechanisms for walking through any arbitrary PHP variable
Swoole - 🚀 Coroutine-based concurrency library for PHP
Expose - A beautiful, fully open-source, tunneling service - written in pure PHP
Slim Framework - Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.
phpstan-safe-rule - A PHPStan rule to be used with the thecodingmachine/safe package
ProxiTok - Open source alternative frontend for TikTok made using PHP
Symfony Dotenv - Registers environment variables from a .env file
Spiral Framework - High-Performance PHP Framework
Yo! Symfony TOML - A PHP parser for TOML
tesseract-ocr-for-php - A wrapper to work with Tesseract OCR inside PHP.