All Projects → nilportugues → Php Backslasher

nilportugues / Php Backslasher

Licence: mit
[Git hook] Tool to add all PHP internal functions and constants to its namespace by adding backslash to them.

Projects that are alternatives of or similar to Php Backslasher

K8s Config Projector
Create Kubernetes ConfigMaps from configuration files
Stars: ✭ 61 (-22.78%)
Mutual labels:  ci
Talisman
By hooking into the pre-push hook provided by Git, Talisman validates the outgoing changeset for things that look suspicious - such as authorization tokens and private keys.
Stars: ✭ 1,155 (+1362.03%)
Mutual labels:  git-hooks
Teamcity Dotnet Plugin
TeamCity plugin for .NET Core projects
Stars: ✭ 77 (-2.53%)
Mutual labels:  ci
Smart Commit
Commit with current branch name.
Stars: ✭ 63 (-20.25%)
Mutual labels:  git-hooks
Cloudflare Purge Action
🗑️ GitHub Action to purge a website's cache via the Cloudflare API
Stars: ✭ 66 (-16.46%)
Mutual labels:  ci
Ic
去哪儿公司内部CI、CD以及devops体系建设过程中使用的消息系统和数据中心。由于其基于HTTP协议的特性,具有跨平台、跨语言的优点。而devops体系搭建中,会引入各种开源工具,这些工具的语言差异也很大。基于IC,我们不仅快速实现了流程自动化,而且系统解耦,自动化进程大大提高。
Stars: ✭ 73 (-7.59%)
Mutual labels:  ci
Gitmoji Commit Hook
Start the commit message with an applicable emoji
Stars: ✭ 58 (-26.58%)
Mutual labels:  git-hooks
Gitlab Ci Dashboard
📊 Dashboard for monitoring GitLab CI builds and pipelines for TV
Stars: ✭ 79 (+0%)
Mutual labels:  ci
Changelog Ci
Changelog CI is a GitHub Action that generates changelog, Then the changelog is committed and/or commented to the release Pull request.
Stars: ✭ 68 (-13.92%)
Mutual labels:  ci
Git Release
Publish a GitHub Release 📦 with Assets 📁 and Changelog 📄
Stars: ✭ 77 (-2.53%)
Mutual labels:  ci
Terraform Security Scan
Run a security scan on your terraform with the very nice https://github.com/liamg/tfsec
Stars: ✭ 64 (-18.99%)
Mutual labels:  ci
Action Maven Publish
📦 GitHub Action for automatically publishing Maven packages
Stars: ✭ 66 (-16.46%)
Mutual labels:  ci
Jest Action
Wraps and install Jest test runner in a github action.
Stars: ✭ 74 (-6.33%)
Mutual labels:  ci
Simpleci
Simple docker-based continuous integration system
Stars: ✭ 61 (-22.78%)
Mutual labels:  ci
Setup Msys2
GitHub Action to setup MSYS2 (MSYS, MINGW64 and/or MINGW32)
Stars: ✭ 78 (-1.27%)
Mutual labels:  ci
Flow Core X
Powerful and user-friendly CI / CD server with high availability, parallel build, agent scaling
Stars: ✭ 1,108 (+1302.53%)
Mutual labels:  ci
Jmeter Elasticsearch Backend Listener
JMeter plugin that lets you send sample results to an ElasticSearch engine to enable live monitoring of load tests.
Stars: ✭ 72 (-8.86%)
Mutual labels:  ci
Gohci
Go on Hardware CI: 100% free open source CI to run on RPis, macOS and Windows
Stars: ✭ 79 (+0%)
Mutual labels:  ci
Documentation
Documentation for Codeship CI & CD service
Stars: ✭ 78 (-1.27%)
Mutual labels:  ci
Ocurrent
Keeps things up-to-date (a CI/CD pipeline OCaml eDSL)
Stars: ✭ 76 (-3.8%)
Mutual labels:  ci

Build Status Scrutinizer Code Quality SensioLabsInsight Latest Stable Version Total Downloads License Donate

PHP BackSlasher

Tool to add all PHP internal functions and constants to its namespace by adding backslash to them.

Function resolution without the backslash forces the PHP internals to verify for each function call if function or constant belongs to current namespace or the global namespace. With the backslash PHP does not check the current namespace and therefore execution is faster when using OP Cache.

Idea from Nikita Popov talk:

Installation

Use Composer to install the package:

$ composer require --dev nilportugues/php_backslasher

Usage

$ php bin/php_backslasher fix <path/to/directory>

Output

Works for functions in conditional statements, negative conditionals, placed in an array as key or value and any other normal use. Also adds a backslash to defined constants and true, false and null values.

Internal functions and constants

echo strlen('Hello World');
var_dump(null);
var_dump(false);
echo DIRECTORY_SEPARATOR;
return true;

// becomes:
echo \strlen('Hello World');
\var_dump(\null);
\var_dump(\false);
echo \DIRECTORY_SEPARATOR;
return \true;

Contribute

Contributions to the package are always welcome!

Support

Get in touch with me using one of the following means:

Authors

License

The code base is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].