Coder Social home page Coder Social logo

PHP 8 compatibility about monolog-cascade HOT 4 OPEN

theorchard avatar theorchard commented on July 20, 2024 4
PHP 8 compatibility

from monolog-cascade.

Comments (4)

smlawrence avatar smlawrence commented on July 20, 2024

I have this running in my PHP8 application as a local copy in the project. Has there been a scope of work identified that needs to be done before the composer file can include PHP8?

from monolog-cascade.

smlawrence avatar smlawrence commented on July 20, 2024

Confirmed that the dev dependencies block composer install running cleanly in a PHP8 environment.

In order to run PHAN in PHP8 on the codebase I removed the dev dependencies from the composer.json, added PHAN and ran with the following config.

There were 0 issues found.

/**
 * This configuration will be read and overlaid on top of the
 * default configuration. Command-line arguments will be applied
 * after this file is read.
 */
return [
    'target_php_version' => '8.0',

    // A list of directories that should be parsed for class and
    // method information. After excluding the directories
    // defined in exclude_analysis_directory_list, the remaining
    // files will be statically analyzed for errors.
    //
    // Thus, both first-party and third-party code being used by
    // your application should be included in this list.
    'directory_list' => [
        'src',
        'vendor'
    ],
    'exclude_analysis_directory_list' => ['vendor'],

    // A regex used to match every file name that you want to
    // exclude from parsing. Actual value will exclude every
    // "test", "tests", "Test" and "Tests" folders found in
    // "vendor/" directory.
    'exclude_file_regex' => '@^vendor/.*/(tests?|Tests?)/@',


    'plugins' => [
        'InvokePHPNativeSyntaxCheckPlugin'
    ],
    'backward_compatibility_checks' => true,
    'minimum_severity' => 10, // 10 == Issue::SEVERITY_CRITICAL
];
?>

from monolog-cascade.

smlawrence avatar smlawrence commented on July 20, 2024

So summary,

  • monolog-cascade appears to have at least minimal functionality working in PHP8 based upon a live example,
  • static codebase analysis in PHAN run with a target of PHP8.0 in a PHP8.0 environment returns no issues with the codebase,
  • The dev dependencies stop the codebase from installing in PHP8 with composer install, specifically phpunit/phpcov
  • PHPUnit has been updated recently (#103)
 Problem 1
    - phpunit/phpcov[6.0.0, ..., 6.0.1] require php ^7.2 -> your php version (8.0.13) does not satisfy that requirement.
    - Root composer.json requires phpunit/phpcov ^6.0 -> satisfiable by phpunit/phpcov[6.0.0, 6.0.1].

=> phpcov 6.1.0 is the last phpcov compatible with PHP8.X but the only phpcov that is marked as PHP8 compatible is 8.2.0 that requires PHPUnit 9.3

from monolog-cascade.

smlawrence avatar smlawrence commented on July 20, 2024

My bad, I presumed you were waiting to update until the entire project could run in PHP8. I didn't see properly the dev-master package and repo are >=7.X so next release is good-to-go.

from monolog-cascade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.