alt3 / cakephp-swagger

Swagger plugin for documenting your CakePHP APIs
MIT License
64 stars 17 forks source link

cakePHP 4.x compatiblity #55

Closed mimorocks closed 4 years ago

mimorocks commented 4 years ago

proposing new branch cake-4.x

fixes #51

bravo-kernel commented 4 years ago

Thanks, looks like the test-suite needs updating as well. If you manage to get this all green I will release a new version. ❤️

mimorocks commented 4 years ago

yes. I did not have time yet to look into that. will keep trying to get it green :)

bravo-kernel commented 4 years ago

take all the time you need, I will probably not be able to review/merge until this Friday anyway. Appreciate it 👍

codecov-io commented 4 years ago

Codecov Report

Merging #55 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##             master    #55   +/-   ##
=======================================
  Coverage       100%   100%           
  Complexity       32     32           
=======================================
  Files             5      5           
  Lines            99     99           
=======================================
  Hits             99     99
Impacted Files Coverage Δ Complexity Δ
src/Controller/AppController.php 100% <100%> (ø) 2 <2> (ø) :arrow_down:
src/Lib/SwaggerTools.php 100% <100%> (ø) 11 <0> (ø) :arrow_down:
src/Controller/UiController.php 100% <100%> (ø) 3 <0> (ø) :arrow_down:
src/Controller/DocsController.php 100% <100%> (ø) 13 <0> (ø) :arrow_down:
src/Shell/SwaggerShell.php 100% <100%> (ø) 3 <1> (ø) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8cc7b03...d9e5391. Read the comment docs.

mimorocks commented 4 years ago

I am not really used to working with travis and/or phpunit/phpcs I have still one failing step. phpcs seems to be missing? but I don't know why. @bravo-kernel any ideas?

The command "sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./config --ignore=.webroot; fi"" exited with 2.

bravo-kernel commented 4 years ago

Not an idea but... I can share how I have always done it from day one.

I always take https://github.com/UseMuffin/Slug as an example of how things should be done (as those maintainers know what they are doing) and then compare what they have in their travis.yml and try to mimic that. E.g.

🤞

bravo-kernel commented 4 years ago

@mimo74 ohhhh, please ignore my previous comment, I was too fast, my bad.

Phpcs is functioning perfectly fine as it is.

There are styling errors in the travis log, see for example https://travis-ci.org/alt3/cakephp-swagger/jobs/655381117#L733 which:

Fix those 3, push the changes and you will see the list of styling errors decrease. Fix until solved.

bravo-kernel commented 4 years ago

Also, it appears the styling errors are unrelated to your change. These are probably new rule sets now triggering the errors because it has been ages since the last release. I don't want to over-ask you here but if you could fix them that would be awesome.

bravo-kernel commented 4 years ago

Sorry for spamming you, two last things:

mimorocks commented 4 years ago

Phpcs is functioning perfectly fine as it is.

ohh... i see.. the lines before where the output of phpcs. I got confused by exited with 2 and interpreted that as not found.

bravo-kernel commented 4 years ago

No worries, phpcs is really good stuff.

mimorocks commented 4 years ago

we are green!

bravo-kernel commented 4 years ago

This is all you man, congrats. I will eat something first, then merge and release a new 4.0.0 version.

Awesome job 💯

bravo-kernel commented 4 years ago

Released as https://github.com/alt3/cakephp-swagger/releases/tag/4.0.0 Packagist updated as well https://packagist.org/packages/alt3/cakephp-swagger

Looks gtm, thanks for this one, really appreciated

bravo-kernel commented 4 years ago

image