Commit 338e87b7 authored by Craig Smith's avatar Craig Smith
Browse files

feat: refactor php 8 / laravel 8/9

parent 1ee7c122
Loading
Loading
Loading
Loading

.phpunit.result.cache

0 → 100644
+1 −0
Original line number Diff line number Diff line
{"version":1,"defects":{"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testKeyGeneration":4,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testKeyGenerationWithPassword":4,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testKeyGenerationWithPasswordAndSalt":4,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testKeyPopulation":4,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testKeyPopulationWithPassword":4,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testKeyPopulationWithPasswordAndSalt":4,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testMessageEncryptionForLongerMessages":4,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testMessageEncryptionForLongerMessagesWithEncryptedKey":4,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testShouldMatchConfigVars":4,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testMultipleKeys":4,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testMultipleKeysPreset":4,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::test_checkPublicKey":4,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testHiLoad":4,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::test_checkPublicKey_good":3},"times":{"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testKeyGeneration":0.379,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testKeyGenerationWithPassword":0.193,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testKeyGenerationWithPasswordAndSalt":0.202,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testKeyPopulation":0.044,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testKeyPopulationWithPassword":0.171,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testKeyPopulationWithPasswordAndSalt":0.138,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testMessageEncryptionForLongerMessages":0.119,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testMessageEncryptionForLongerMessagesWithEncryptedKey":0.138,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testShouldMatchConfigVars":0.112,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testMultipleKeys":0.768,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testMultipleKeysPreset":0.04,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::testHiLoad":1.44,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::test_checkPublicKey":0.024,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::test_checkPublicKey_bad":0.023,"CustomD\\EloquentAsyncKeys\\Tests\\EloquentAsyncKeysTest::test_checkPublicKey_good":0.023}}
 No newline at end of file
+7 −5
Original line number Diff line number Diff line
@@ -15,13 +15,14 @@
    }
  ],
  "require": {
    "php": "^7.1|^8.0",
    "illuminate/support": "5.8|^6.0|^7.0|^8.0",
    "php": "^8.0",
    "illuminate/support": "^8.0|^9.0",
    "ext-openssl": "*"
  },
  "require-dev": {
    "orchestra/testbench": "^3.8|^4.0|^5.0|^6.0",
    "phpunit/phpunit": "^8.0|^9.0|^10.0"
    "orchestra/testbench": "^6.0|^7.0",
    "phpunit/phpunit": "^9.0",
    "nunomaduro/larastan": "^2.0"
  },
  "autoload": {
    "psr-4": {
@@ -37,7 +38,8 @@
    ]
  },
  "scripts": {
    "phpunit": "phpunit"
    "phpunit": "phpunit",
    "phpstan": "phpstan analyse"
  },
  "extra": {
    "laravel": {

phpcs.xml

0 → 100644
+99 −0
Original line number Diff line number Diff line
<?xml version="1.0"?>
<ruleset name="Laravel Standards">

    <description>The Laravel Coding Standards</description>
        <rule ref="PSR12">
            <exclude name="PSR12.Traits.UseDeclaration.MultipleImport" />
        </rule>


     <rule ref="PSR1">
        <exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>
        <exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"/>
        <exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
        <exclude name="PSR1.Classes.ClassDeclaration.MultipleClasses" />
    </rule>

    <rule ref="PSR2">
        <exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>

        <!-- Excluded to avoid conflict with the same rule (!??!) in PSR12. -->
        <exclude name="PSR2.ControlStructures.ControlStructureSpacing"/>
    </rule>

    <!-- View templates don't necessarily start with <?php (because some are just pure html) -->
    <rule ref="PSR12.Files.FileHeader.HeaderPosition">
        <exclude-pattern>*/views/*</exclude-pattern>
    </rule>

    <!-- We like to have a space after the ! operator. -->
    <rule ref="Generic.Formatting.SpaceAfterNot" />

    <!-- Rules to improve array formatting. -->
    <rule ref="Generic.Arrays.DisallowLongArraySyntax" />
    <rule ref="Generic.Arrays.ArrayIndent" />
    <rule ref="Squiz.Arrays.ArrayDeclaration.DoubleArrowNotAligned" />

    <rule ref="Generic.VersionControl.GitMergeConflict" />
    <rule ref="Squiz.PHP.NonExecutableCode" />


    <!-- Remove trailing whitespace, multiple blank lines within functions, etc. -->
    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
        <properties>
            <property name="ignoreBlankLines" value="false"/>
        </properties>
    </rule>
    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile">
        <severity>10</severity>
    </rule>
    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile">
        <severity>10</severity>
    </rule>
    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
        <severity>10</severity>
    </rule>
     <rule ref="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace">
      <severity>10</severity>
    </rule>


    <!-- indentation of 4 spaces -->
    <rule ref="Generic.WhiteSpace.ScopeIndent">
        <properties>
            <property name="exact" value="true" />
        </properties>
    </rule>


	<exclude-pattern>*/_ide_helper.php</exclude-pattern>
    <exclude-pattern>*/cache/*</exclude-pattern>
    <exclude-pattern>*/*.js</exclude-pattern>
    <exclude-pattern>*/*.css</exclude-pattern>
    <exclude-pattern>*/*.xml</exclude-pattern>
    <exclude-pattern>*/*.blade.php</exclude-pattern>
    <exclude-pattern>*/autoload.php</exclude-pattern>
    <exclude-pattern>*/storage/*</exclude-pattern>
    <exclude-pattern>*/docs/*</exclude-pattern>
    <exclude-pattern>*/vendor/*</exclude-pattern>
    <exclude-pattern>*/migrations/*</exclude-pattern>
    <exclude-pattern>*/config/*</exclude-pattern>
    <exclude-pattern>*/public/index.php</exclude-pattern>

	<file>app</file>
	<file>database</file>
    <file>config</file>
    <file>public</file>
    <file>resources</file>
    <file>routes</file>
    <file>tests</file>

    <arg name="colors"/>
    <arg value="spvn"/>
    <ini name="memory_limit" value="512M"/>





</ruleset>

phpstan.neon.dist

0 → 100644
+18 −0
Original line number Diff line number Diff line
includes:
    - ./vendor/nunomaduro/larastan/extension.neon

parameters:

    paths:
        - src

    # The level 9 is the highest level
    level: 9

    ignoreErrors:
    #    - '#PHPDoc tag @var#'

    excludePaths:
    #    - ./*/*/FileToBeExcluded.php

    checkMissingIterableValueType: true
+6 −14
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
         backupStaticAttributes="false"
         bootstrap="vendor/autoload.php"
         colors="true"
         convertErrorsToExceptions="true"
         convertNoticesToExceptions="true"
         convertWarningsToExceptions="true"
         processIsolation="false"
         stopOnFailure="false">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
  <coverage processUncoveredFiles="true">
    <include>
      <directory suffix=".php">src</directory>
    </include>
  </coverage>
  <testsuites>
    <testsuite name="package">
      <directory suffix="Test.php">tests</directory>
    </testsuite>
  </testsuites>
  <filter>
    <whitelist processUncoveredFilesFromWhitelist="true">
      <directory suffix=".php">src</directory>
    </whitelist>
  </filter>
</phpunit>
Loading