Coder Social home page Coder Social logo

Comments (27)

mikeerickson avatar mikeerickson commented on May 22, 2024 2

@bueltge my apologies for issue. I will get this resolved tomorrow when I return to work. Try to keep family time sacred on weekends 🤓

from phpunit-pretty-result-printer.

bueltge avatar bueltge commented on May 22, 2024 2

Thanks a lot! Nice result before holidays and time to tag version 1.0.0 👍

from phpunit-pretty-result-printer.

mikeerickson avatar mikeerickson commented on May 22, 2024 1

I have already seen this issue (that is an artifact of the addition of files in the files section of autoload. I have removed these items as that is NOT the cure to this problem (there has been a new version posted 0.21.1 which addresses this very issue)

These items are included everytime phpunit is executed which is NOT how it should work. So, the fix causes additional issues :-(

You can "fix" the above issue by removing the autoload - files items

from phpunit-pretty-result-printer.

mikeerickson avatar mikeerickson commented on May 22, 2024 1

@bueltge Awesome! Thanks for confirmation and enjoy your holiday :-)

from phpunit-pretty-result-printer.

mikeerickson avatar mikeerickson commented on May 22, 2024

Quite puzzling as some of the files missing appear to also be PHPUnit files. Could you trying uninstall and reinstalling PHPUnit and result printer. Maybe a permissions issue as well.

from phpunit-pretty-result-printer.

bueltge avatar bueltge commented on May 22, 2024

I have tried this i several different updates, no chance to get the missing files. I opened this issue because the problem is still existent on Travis, see the log file on this example project - https://travis-ci.org/bueltge/marksimple/jobs/429185866
So I think is not a permission problem, is on my local machine and also on Travis client.

However thanks for your fast reply!

from phpunit-pretty-result-printer.

mikeerickson avatar mikeerickson commented on May 22, 2024

@bueltge can you please try using the following command in terminal. I am really puzzled on this one. I have tried a variety of methods to reproduce this, but it always works

composer require codedungeon/phpunit-result-printer --update-with-all-dependencies

In addition, perhaps delete the existing package (and remove entry from composer.json)

rm -rf vendor/codedungeon/phpunit-result-printer

After deletion, then run the composer command above

from phpunit-pretty-result-printer.

bueltge avatar bueltge commented on May 22, 2024

Hi @mikeerickson Thanks for your feedback.

At first I tried to remove the the entry from the composer.json
"codedungeon/phpunit-result-printer": "^0.20" on require-dev and after a composer update the directory vendor/codedungeon/ is deleted. So that rm -rf vendor/codedungeon/.. is not possible.

Now I tried to add the package completely new with composer require codedungeon/phpunit-result-printer --update-with-all-dependencies. This add the package to require of my `composer.json.

the output of the temrinal:

/v/w/marksimple (master) $ composer require codedungeon/phpunit-result-printer --update-with-all-dependencies
Using version ^0.20.1 for codedungeon/phpunit-result-printer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 6 installs, 0 updates, 0 removals
  - Installing 2bj/phanybar (v1.0.0): Loading from cache
  - Installing codedungeon/php-cli-colors (1.10.7): Loading from cache
  - Installing symfony/polyfill-ctype (v1.9.0): Loading from cache
  - Installing symfony/yaml (v4.1.4): Loading from cache
  - Installing hassankhan/config (1.1.0): Loading from cache
  - Installing codedungeon/phpunit-result-printer (0.20.1): Loading from cache
symfony/yaml suggests installing symfony/console (For validating YAML files using the lint command)

The package is now on the local machine installed, however also without init.php and the json file, only this directory structure:

  • vendor/codedungeon
    -- php-cli-colors
    -- phpunit-result-printer

Thanks for an other idea?

from phpunit-pretty-result-printer.

mikeerickson avatar mikeerickson commented on May 22, 2024

What is your operating system?

from phpunit-pretty-result-printer.

bueltge avatar bueltge commented on May 22, 2024

Linux, Ubuntu 18.04 lte

from phpunit-pretty-result-printer.

mikeerickson avatar mikeerickson commented on May 22, 2024

@bueltge I have published a new version 0.20.3 which is now passing all travis tests and I am able to install into the same configuration you have described above (using a docker container)

Can you please test this build and let me know if you still have issues.

from phpunit-pretty-result-printer.

bueltge avatar bueltge commented on May 22, 2024

Hi @mikeerickson
Now I found the time to play again, but always the same problem. Yes it updates to 0.20.3, but the files are also missed. Only the this directory structure

  • vendor/codedungeon
    • php-cli-colors
    • phpunit-result-printer

from phpunit-pretty-result-printer.

mikeerickson avatar mikeerickson commented on May 22, 2024

My goodness, this is so bizarre. I am at a loss as to what could be interfering. If you install 0.20.1 does it work?

from phpunit-pretty-result-printer.

bueltge avatar bueltge commented on May 22, 2024

No, update to the lower version 0.20.1 have the same result.

I have also try to create a completely new project, new directory and start from zero, only a composer.json include the require-dev definition. In this test I tried also to remove all files in vendor and all in .composer/cache. So should remove all local dependencies, caching topics.
The result on composer install for your package

  - Installing hassankhan/config (0.11.2): Downloading (100%)         
  - Installing codedungeon/phpunit-result-printer (0.20.3): Downloading (connectDownloading (100%)   

After this the same problem, only the directory structure like above and missing the files outside this, also the init.php.

from phpunit-pretty-result-printer.

mikeerickson avatar mikeerickson commented on May 22, 2024

If any of you are using the same machine configuration as defined by @bueltge could you please see if you are experiencing the same issue? I am really puzzled on this one as it works fine here

Environment where it appears to cause issues
Linux, Ubuntu 18.04 lte

I have tested using

  • macOS
  • windows
  • linux (running in a docker container)

from phpunit-pretty-result-printer.

bueltge avatar bueltge commented on May 22, 2024

Hi @mikeerickson
thanks for your time and willing to help.
I check a lot fo thinks, but I can't find any problem. I checked also all packages there I use and in each package, the first directory below from vendor/username is always only a directory, never a single file. So that I mean you should all files include in src. In each directory of other projects is it only the same structure

  • vendor
    • username (namespace like codedungeon)
      • package name (like phpunit-result-printer)
        • composer.json
        • LICENSE
        • src or other directory include all necessary files
        • NEVER other files as above

I use composer version: 1.7.2 2018-08-16 16:57:12

As example from my side please see https://github.com/inpsyde/php-coding-standards/
Also in if I use this repo I get only

  • vendor
    • inpsyde
      • php-coding-standard
        • composer.json
        • LICENSE
        • Inpsyde

from phpunit-pretty-result-printer.

bueltge avatar bueltge commented on May 22, 2024

Additional idea. I think I get always only the files in src, defined in your composer.json. Maybe you should add this two important files as require, see composer schema.

I mean like below:

  "autoload": {
    "psr-4": {
      "Codedungeon\\PHPUnitPrettyResultPrinter\\": "src/"
    },
    "files": [init.php, phpunit-printer.yml]
  },

from phpunit-pretty-result-printer.

mikeerickson avatar mikeerickson commented on May 22, 2024

@bueltge I have adjusted the composer.json to include these references. If you could please test 0.21.0 https://github.com/mikeerickson/phpunit-pretty-result-printer/releases/tag/0.21.0 and let me know if it cures your issue, I would greatly appreciate it.

from phpunit-pretty-result-printer.

bueltge avatar bueltge commented on May 22, 2024

It works! 🎉

Now, after a simple composer update are this two files are include the directory of the project codedungeon/phpunit-result-printer.

my terminal:

/v/w/marksimple (master) $ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Updating codedungeon/phpunit-result-printer (0.20.3 => 0.21.0): Downloading Downloading (100%)         
Writing lock file
Generating optimized autoload files
PHP CodeSniffer Config installed_paths set to ../../wp-coding-standards/wpcs/,../../automattic/phpcs-neutron-standard/,../../inpsyde/php-coding-standards/,../../wimg/php-compatibility/
Composer cleaner: Removed 10 files or directories.
/v/w/marksimple (master) $ vendor/bin/phpunit 

==> Configuring phpunit-pretty-result-printer

    [•  ] Gathering installation details
    [•• ] Printer class already configured in ./phpunit.xml.dist 
    [•••] Configuration ./phpunit-printer.yml already exists

==> Configuration Complete
options:
  cd-printer-hide-class: false
  cd-printer-simple-output: false
  cd-printer-show-config: true
  cd-printer-hide-namespace: false
  cd-printer-anybar: false
  cd-printer-anybar-port: 1738
markers:
  cd-pass: ""
  cd-fail: ""
  cd-error: ""
  cd-skipped: ""
  cd-incomplete: ""

And the result inside my file browser:
image

Really great, thanks a lot for your patience and quick trials.

Only a small problem. Now the Configuring phpunit-pretty-result-printer run always on each phpunit run. I think the init.php run always on each run of phpunit.

from phpunit-pretty-result-printer.

wells avatar wells commented on May 22, 2024

v0.21 also creates a phpunit-printer.yml file in my application directory whenever php runs, whereas before it silently used a default configuration.

I can also confirm that it displays configuration on every php unit run on macOS.

~ phpunit

==> Configuring phpunit-pretty-result-printer

    [•  ] Gathering installation details
    [•• ] Printer class already configured in ./phpunit.xml
    [•••] Configuration ./phpunit-printer.yml already exists

==> Configuration Complete
options:
  cd-printer-hide-class: false
  cd-printer-simple-output: false
  cd-printer-show-config: true
  cd-printer-hide-namespace: false
  cd-printer-anybar: false
  cd-printer-anybar-port: 1738
markers:
  cd-pass: "✓ "
  cd-fail: "✖ "
  cd-error: "⚈ "
  cd-skipped: "→ "
  cd-incomplete: "∅ "
  cd-risky: "⌽ "
PHPUnit Pretty Result Printer 0.21.0 by Codedungeon and contributors.

from phpunit-pretty-result-printer.

mikeerickson avatar mikeerickson commented on May 22, 2024

@bueltge BUT, I have a solution (just thought about this) Let me give it a whirl here and see what happens

from phpunit-pretty-result-printer.

bueltge avatar bueltge commented on May 22, 2024

I think the solution on the way, before goal. No worries and thanks a lot.

from phpunit-pretty-result-printer.

mikeerickson avatar mikeerickson commented on May 22, 2024

@bueltge OK, I think I have a working solution. Will you be around to test? What time is it where you live? I am in USA PST (it is 1231 right now)

from phpunit-pretty-result-printer.

bueltge avatar bueltge commented on May 22, 2024

I'm in Europe, Germany, timezone Berlin. Currently 2131. I can test for now, also for the next 1h. But never after Sunday, 2 weeks holiday offline.

from phpunit-pretty-result-printer.

mikeerickson avatar mikeerickson commented on May 22, 2024

OK, I will be posting a new build 0.22.0 now

from phpunit-pretty-result-printer.

mikeerickson avatar mikeerickson commented on May 22, 2024

Note: The init command should be as follows (moved the init.php and phpunit-printer.yml files into src directory(

php ./vendor/codedungeon/phpunit-result-printer/src/init.php

from phpunit-pretty-result-printer.

bueltge avatar bueltge commented on May 22, 2024

🎉 No problems with this version. All files are in srcand it works. The call via console to the init.php works also really well.
Thanks a lot!

/v/w/marksimple (master) $ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Updating codedungeon/phpunit-result-printer (0.21.0 => 0.22.0): Downloading Downloading (100%)         
Writing lock file
Generating optimized autoload files
PHP CodeSniffer Config installed_paths set to ../../inpsyde/php-coding-standards/,../../wimg/php-compatibility/,../../wp-coding-standards/wpcs/,../../automattic/phpcs-neutron-standard/
Composer cleaner: Removed 10 files or directories.

Run of src/init.php

/v/w/marksimple (master) $ php ./vendor/codedungeon/phpunit-result-printer/src/init.php

==> Configuring phpunit-pretty-result-printer

    [•  ] Gathering installation details
    [•• ] Printer class already configured in ./phpunit.xml.dist 
    [•••] Configuration ./phpunit-printer.yml already exists

Resulting in tests
image

from phpunit-pretty-result-printer.

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.