Closed bueltge closed 6 years ago
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.
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!
@bueltge my apologies for issue. I will get this resolved tomorrow when I return to work. Try to keep family time sacred on weekends 🤓
@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
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:
Thanks for an other idea?
What is your operating system?
Linux, Ubuntu 18.04 lte
@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.
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
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?
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
.
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
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
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
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]
},
@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.
It works! :tada:
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:
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.
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.
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
@bueltge BUT, I have a solution (just thought about this) Let me give it a whirl here and see what happens
I think the solution on the way, before goal. No worries and thanks a lot.
@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)
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.
OK, I will be posting a new build 0.22.0
now
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
:tada: No problems with this version. All files are in src
and 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
@bueltge Awesome! Thanks for confirmation and enjoy your holiday :-)
Thanks a lot! Nice result before holidays and time to tag version 1.0.0 :+1:
At first thanks a lot for your library that me get a really fast overview about my tests. I use it since linger times.
Currently I have problems in a project, that use the library. After
composer update
the version 0.20.1 is active and I get always the error messageMaybe you have a hint for me, always the init. php and the json file is missed.
The problem is still existent on local client and also on travis. That's my composer.json for the dependencies: