Giter Club home page Giter Club logo

Comments (3)

luri-fr avatar luri-fr commented on August 17, 2024

Ok. In my libs/bin/pest file, I have :

#!/usr/bin/env php
<?php

/**
 * Proxy PHP file generated by Composer
 *
 * This file includes the referenced bin path (../pestphp/pest/bin/pest)
 * using a stream wrapper to prevent the shebang from being output on PHP<8
 *
 * @generated
 */

namespace Composer;

$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';

if (PHP_VERSION_ID < 80000) {
[...]

So, if I replace Line 54 of pestphp/pest/bin/pest :

    $vendorPath = dirname(__DIR__, 4).'/vendor/autoload.php';

by

    $vendorPath = $GLOBALS['_composer_autoload_path'];

it's working for me.
But this fix is linked to the version of composer (2.7.2) and i don't know in which version composer introduce $GLOBALS['_composer_autoload_path'] and which minimum version of composer you want to support.
So I don't make PR. (I don't want to break other people.)

from pest.

luri-fr avatar luri-fr commented on August 17, 2024

Well... not really working.

.\libs\bin\pest --init create file in libs\bin\ directory and after I move the files .\libs\bin\pest show :

   INFO  Cannot open bootstrap script "D:\[...]\MyOidc\vendor/autoload.php".

from pest.

luri-fr avatar luri-fr commented on August 17, 2024

Ok I found.

In phpunit.xml, I must replace :

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
         bootstrap="vendor/autoload.php"
         colors="true"
>

by

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
         bootstrap="libs/autoload.php"
         colors="true"
>

Perhaps this can be added in the documention ?

from pest.

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.