mirror of
https://github.com/10h30/genesis-simple-sidebars.git
synced 2026-07-18 05:53:26 +09:00
Introducing coding standards validation.
This commit is contained in:
committed by
Nathan Rice
parent
6e40c921ab
commit
fd504d41ac
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat/ruleset.xml
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="PHPCompatibilityParagonieRandomCompat">
|
||||
<description>PHPCompatibility ruleset for PHP_CodeSniffer which accounts for polyfills provided by the Paragonie random_compat library.</description>
|
||||
|
||||
<rule ref="PHPCompatibility">
|
||||
<!-- https://github.com/paragonie/random_compat/blob/master/lib/random.php -->
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.php_version_idFound"/>
|
||||
|
||||
<!-- https://github.com/paragonie/random_compat/blob/master/lib/random_bytes_*.php -->
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.random_bytesFound"/>
|
||||
|
||||
<!-- https://github.com/paragonie/random_compat/blob/master/lib/random_int.php -->
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.random_intFound"/>
|
||||
|
||||
<!-- https://github.com/paragonie/random_compat/blob/master/lib/error_polyfill.php -->
|
||||
<exclude name="PHPCompatibility.Classes.NewClasses.errorFound"/>
|
||||
<exclude name="PHPCompatibility.Classes.NewClasses.typeerrorFound"/>
|
||||
</rule>
|
||||
|
||||
<!-- Prevent false positives being thrown when run over the code of random_compat itself. -->
|
||||
<rule ref="PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated">
|
||||
<exclude-pattern>/random_compat/lib/byte_safe_strings\.php$</exclude-pattern>
|
||||
</rule>
|
||||
<rule ref="PHPCompatibility.FunctionUse.NewFunctions.stream_set_chunk_sizeFound">
|
||||
<exclude-pattern>/random_compat/lib/random_bytes_dev_urandom\.php$</exclude-pattern>
|
||||
</rule>
|
||||
<rule ref="PHPCompatibility.Constants.RemovedConstants.mcrypt_dev_urandomDeprecatedRemoved">
|
||||
<exclude-pattern>/random_compat/lib/random_bytes_mcrypt\.php$</exclude-pattern>
|
||||
</rule>
|
||||
<rule ref="PHPCompatibility.Extensions.RemovedExtensions.mcryptDeprecatedRemoved">
|
||||
<exclude-pattern>/random_compat/lib/random_bytes_mcrypt\.php$</exclude-pattern>
|
||||
</rule>
|
||||
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_create_ivDeprecatedRemoved">
|
||||
<exclude-pattern>/random_compat/lib/random_bytes_mcrypt\.php$</exclude-pattern>
|
||||
</rule>
|
||||
<rule ref="PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound">
|
||||
<exclude-pattern>/random_compat/lib/random_bytes_libsodium\.php$</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
</ruleset>
|
||||
vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieSodiumCompat/ruleset.xml
Vendored
+148
@@ -0,0 +1,148 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="PHPCompatibilityParagonieSodiumCompat">
|
||||
<description>PHPCompatibility ruleset for PHP_CodeSniffer which accounts for polyfills provided by the Paragonie sodium_compat library.</description>
|
||||
|
||||
<!--
|
||||
Note: this ruleset does **not** contain excludes for the `sodium_pwhash()` and
|
||||
the sodium_memzero() functions as, while those functions do exist in the polyfill,
|
||||
they do not work and are explicitly excluded features.
|
||||
See: https://github.com/paragonie/sodium_compat#features-excluded-from-this-polyfill
|
||||
|
||||
With that in mind, these functions should not be used in code which intends to be
|
||||
PHP cross-version compatible.
|
||||
-->
|
||||
|
||||
<!-- https://github.com/paragonie/sodium_compat/blob/master/composer.json -->
|
||||
<rule ref="PHPCompatibilityParagonieRandomCompat"/>
|
||||
|
||||
<rule ref="PHPCompatibility">
|
||||
<!-- https://github.com/paragonie/sodium_compat/blob/master/src/SodiumException.php -->
|
||||
<exclude name="PHPCompatibility.Classes.NewClasses.sodiumexceptionFound"/>
|
||||
|
||||
<!-- https://github.com/paragonie/sodium_compat/blob/master/lib/php72compat.php -->
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_aead_chacha20poly1305_keybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_aead_chacha20poly1305_nsecbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_aead_chacha20poly1305_npubbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_aead_chacha20poly1305_abytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_aead_aes256gcm_keybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_aead_aes256gcm_nsecbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_aead_aes256gcm_npubbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_aead_aes256gcm_abytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_aead_chacha20poly1305_ietf_keybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_aead_chacha20poly1305_ietf_nsecbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_aead_chacha20poly1305_ietf_npubbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_aead_chacha20poly1305_ietf_abytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_auth_bytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_auth_keybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_box_sealbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_box_secretkeybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_box_publickeybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_box_keypairbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_box_macbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_box_noncebytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_box_seedbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_kx_bytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_kx_publickeybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_kx_secretkeybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_kx_seedbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_generichash_bytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_generichash_bytes_minFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_generichash_bytes_maxFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_generichash_keybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_generichash_keybytes_minFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_generichash_keybytes_maxFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_pwhash_saltbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_pwhash_strprefixFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_pwhash_alg_argon2i13Found"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_pwhash_alg_argon2id13Found"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_pwhash_memlimit_interactiveFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_pwhash_opslimit_interactiveFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_pwhash_memlimit_moderateFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_pwhash_opslimit_moderateFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_pwhash_memlimit_sensitiveFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_pwhash_opslimit_sensitiveFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_scalarmult_bytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_scalarmult_scalarbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_shorthash_bytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_shorthash_keybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_secretbox_keybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_secretbox_macbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_secretbox_noncebytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_sign_bytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_sign_seedbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_sign_publickeybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_sign_secretkeybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_sign_keypairbytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_stream_keybytesFound"/>
|
||||
<exclude name="PHPCompatibility.Constants.NewConstants.sodium_crypto_stream_noncebytesFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_bin2hexFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_compareFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_aead_aes256gcm_decryptFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_aead_aes256gcm_encryptFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_aead_aes256gcm_is_availableFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_aead_chacha20poly1305_decryptFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_aead_chacha20poly1305_encryptFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_aead_chacha20poly1305_keygenFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_aead_chacha20poly1305_ietf_decryptFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_aead_chacha20poly1305_ietf_encryptFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_aead_chacha20poly1305_ietf_keygenFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_aead_xchacha20poly1305_ietf_decryptFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_aead_xchacha20poly1305_ietf_encryptFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_aead_xchacha20poly1305_ietf_keygenFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_authFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_auth_keygenFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_auth_verifyFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_boxFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_box_keypairFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_box_keypair_from_secretkey_and_publickeyFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_box_openFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_box_publickeyFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_box_publickey_from_secretkeyFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_box_sealFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_box_seal_openFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_box_secretkeyFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_box_seed_keypairFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_generichashFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_generichash_finalFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_generichash_initFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_generichash_keygenFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_generichash_updateFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_kxFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_pwhash_strFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_pwhash_str_verifyFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_pwhash_scryptsalsa208sha256Found"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_pwhash_scryptsalsa208sha256_strFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_pwhash_scryptsalsa208sha256_str_verifyFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_scalarmultFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_scalarmult_baseFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_secretboxFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_secretbox_keygenFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_secretbox_openFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_shorthashFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_shorthash_keygenFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_signFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_sign_detachedFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_sign_keypairFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_sign_openFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_sign_publickeyFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_sign_publickey_from_secretkeyFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_sign_secretkeyFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_sign_seed_keypairFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_sign_verify_detachedFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_sign_ed25519_pk_to_curve25519Found"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_sign_ed25519_sk_to_curve25519Found"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_streamFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_stream_keygenFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_stream_xorFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_hex2binFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_incrementFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_library_version_majorFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_library_version_minorFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_version_stringFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_memcmpFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_randombytes_bufFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_randombytes_uniformFound"/>
|
||||
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.sodium_randombytes_random16Found"/>
|
||||
</rule>
|
||||
|
||||
</ruleset>
|
||||
@@ -0,0 +1,109 @@
|
||||
[](https://packagist.org/packages/phpcompatibility/phpcompatibility-paragonie)
|
||||
[](https://packagist.org/packages/phpcompatibility/phpcompatibility-paragonie)
|
||||
[](https://github.com/PHPCompatibility/PHPCompatibilityParagonie/blob/master/LICENSE)
|
||||
[](https://travis-ci.org/PHPCompatibility/PHPCompatibilityParagonie)
|
||||
|
||||
# PHPCompatibilityParagonie
|
||||
|
||||
Using PHPCompatibilityParagonie, you can analyse the codebase of a project using either of the Paragonie polyfills, for PHP cross-version compatibility.
|
||||
|
||||
|
||||
## What's in this repo ?
|
||||
|
||||
Two rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.
|
||||
|
||||
These rulesets prevent false positives from the [PHPCompatibility standard](https://github.com/PHPCompatibility/PHPCompatibility) by excluding back-fills and poly-fills which are provided by those libraries.
|
||||
|
||||
Paragonie Polyfill Library | Corresponding PHPCompatibility Ruleset | Includes
|
||||
--- | --- | ---
|
||||
[`random_compat`](https://github.com/paragonie/random_compat) | `PHPCompatibilityParagonieRandomCompat`
|
||||
[`sodium_compat`](https://github.com/paragonie/sodium_compat) | `PHPCompatibilityParagonieSodiumCompat` | `PHPCompatibilityParagonieRandomCompat`
|
||||
|
||||
> Note:
|
||||
> As the `sodium_compat` library has `random_compat` [as a dependency](https://github.com/paragonie/sodium_compat/blob/master/composer.json), the `PHPCompatibilityParagonieSodiumCompat` ruleset includes the `PHPCompatibilityParagonieRandomCompat` ruleset.
|
||||
>
|
||||
> In practice, this means that if your project uses both libraries, you just need to use the `PHPCompatibilityParagonieSodiumCompat` ruleset to prevent false positives from both.
|
||||
|
||||
|
||||
## Requirements
|
||||
|
||||
* [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer).
|
||||
* PHP 5.3+ for use with [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) 2.3.0+.
|
||||
* PHP 5.4+ for use with [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) 3.0.2+.
|
||||
|
||||
Use the latest stable release of PHP_CodeSniffer for the best results.
|
||||
The minimum _recommended_ version of PHP_CodeSniffer is version 2.6.0.
|
||||
* [PHPCompatibility](https://github.com/PHPCompatibility/PHPCompatibility) 9.0.0+.
|
||||
|
||||
|
||||
## Installation instructions
|
||||
|
||||
The only supported installation method is via [Composer](https://getcomposer.org/).
|
||||
|
||||
If you don't have a Composer plugin installed to manage the `installed_paths` setting for PHP_CodeSniffer, run the following from the command-line:
|
||||
```bash
|
||||
composer require --dev dealerdirect/phpcodesniffer-composer-installer:^0.4.4 phpcompatibility/phpcompatibility-paragonie:*
|
||||
composer install
|
||||
```
|
||||
|
||||
If you already have a Composer PHP_CodeSniffer plugin installed, run:
|
||||
```bash
|
||||
composer require --dev phpcompatibility/phpcompatibility-paragonie:*
|
||||
composer install
|
||||
```
|
||||
|
||||
Next, run:
|
||||
```bash
|
||||
vendor/bin/phpcs -i
|
||||
```
|
||||
If all went well, you will now see that the `PHPCompatibility`, `PHPCompatibilityParagonieRandomCompat` and `PHPCompatibilityParagonieSodiumCompat` standards are installed for PHP_CodeSniffer.
|
||||
|
||||
|
||||
## How to use
|
||||
|
||||
Now you can use the following commands to inspect the code in your project for PHP cross-version compatibility:
|
||||
```bash
|
||||
./vendor/bin/phpcs -p . --standard=PHPCompatibilityParagonieRandomCompat
|
||||
|
||||
./vendor/bin/phpcs -p . --standard=PHPCompatibilityParagonieSodiumCompat
|
||||
```
|
||||
|
||||
By default, you will only receive notifications about deprecated and/or removed PHP features.
|
||||
|
||||
To get the most out of the PHPCompatibilityParagonie rulesets, you should specify a `testVersion` to check against. That will enable the checks for both deprecated/removed PHP features as well as the detection of code using new PHP features.
|
||||
|
||||
For example:
|
||||
```bash
|
||||
# For a project which should be compatible with PHP 5.3 up to and including PHP 7.0:
|
||||
./vendor/bin/phpcs -p . --standard=PHPCompatibilityParagonieRandomCompat --runtime-set testVersion 5.3-7.0
|
||||
|
||||
# For a project which should be compatible with PHP 5.4 and higher:
|
||||
./vendor/bin/phpcs -p . --standard=PHPCompatibilityParagonieSodiumCompat --runtime-set testVersion 5.4-
|
||||
```
|
||||
|
||||
For more detailed information about setting the `testVersion`, see the README of the generic [PHPCompatibility](https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions) standard.
|
||||
|
||||
|
||||
### Testing PHP files only
|
||||
|
||||
By default PHP_CodeSniffer will analyse PHP, JavaScript and CSS files. As the PHPCompatibility sniffs only target PHP code, you can make the run slightly faster by telling PHP_CodeSniffer to only check PHP files, like so:
|
||||
```bash
|
||||
./vendor/bin/phpcs -p . --standard=PHPCompatibilityParagonieRandomCompat --extensions=php --runtime-set testVersion 5.3-
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
All code within the PHPCompatibility organisation is released under the GNU Lesser General Public License (LGPL). For more information, visit https://www.gnu.org/copyleft/lesser.html
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
### 1.0.1 - 2018-12-16
|
||||
|
||||
* Prevent false positives when the ruleset is run over the code of the `RandomCompat` polyfill itself.
|
||||
* The rulesets are now also tested against PHP 7.3.
|
||||
Note: full PHP 7.3 support is only available in combination with PHP_CodeSniffer 2.9.2 or 3.3.1+ due to an incompatibility within PHP_CodeSniffer itself.
|
||||
|
||||
### 1.0.0 - 2018-10-07
|
||||
|
||||
Initial release of PHPCompatibilityParagonie containing rulesets covering the `random_compat` and `sodium_compat` polyfill libraries.
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name" : "phpcompatibility/phpcompatibility-paragonie",
|
||||
"description" : "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.",
|
||||
"type" : "phpcodesniffer-standard",
|
||||
"keywords" : [ "compatibility", "phpcs", "standards", "paragonie", "polyfill" ],
|
||||
"homepage" : "http://phpcompatibility.com/",
|
||||
"license" : "LGPL-3.0-or-later",
|
||||
"authors" : [ {
|
||||
"name" : "Wim Godden",
|
||||
"role" : "lead"
|
||||
},
|
||||
{
|
||||
"name" : "Juliette Reinders Folmer",
|
||||
"role" : "lead"
|
||||
} ],
|
||||
"support" : {
|
||||
"issues" : "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues",
|
||||
"source" : "https://github.com/PHPCompatibility/PHPCompatibilityParagonie"
|
||||
},
|
||||
"require" : {
|
||||
"phpcompatibility/php-compatibility" : "^9.0"
|
||||
},
|
||||
"require-dev" : {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4"
|
||||
},
|
||||
"suggest" : {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
|
||||
"roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
|
||||
},
|
||||
"prefer-stable" : true
|
||||
}
|
||||
Reference in New Issue
Block a user