FriendsOfSymfony / FOSRestBundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony
http://symfony.com/doc/master/bundles/FOSRestBundle/index.html
MIT License
2.79k stars 704 forks source link

2.8.x removes several folders #2277

Closed fsmeier closed 3 years ago

fsmeier commented 3 years ago

Expected behaviour: Installing FOS restbundle via composer with version 2.8.3 should have the same folders as the files in the repo when selected the tag 2.8.3

Actual behaviour: Several folders are missing. (for example "Tests")

https://github.com/FriendsOfSymfony/FOSRestBundle/releases/tag/2.8.3 If you download the source files you see its missing. Same if you install via composer. But in the repo all files are there.

Last working version: 2.7.4 https://github.com/FriendsOfSymfony/FOSRestBundle/releases/tag/2.7.4

xabbuh commented 3 years ago

This looks expected to me. The Tests directory is not meant to be used by users of this bundle.

fsmeier commented 3 years ago

The FOS\RestBundle\Tests\Functional\WebTestCase is used in one of the projects I am using. It was available all the time and it is also visible in the file slist and i could not see any hint so far telling this breaking change.

So even if it maybe was not intended to have in the very first place it was public for a long time (over 2 years) and therefore used by people out there.

So I would still call it a bug. Anyone knows why it got changed?

GuilhemN commented 3 years ago

I'm not sure what you could use FOS\RestBundle\Tests\Functional\WebTestCase for, it is very specific to the tests FOSRestBundle runs, and if you need to do something similar you can directly extend Symfony\Bundle\FrameworkBundle\Test\WebTestCase.

In pretty much all PHP libraries the Tests folder is considered internal and everything can be changed in it without any notice. This is a convention supported by the fact that this is not a testing library and the Tests folder is only here to ensure everything is working fine before a release and is not meant to be used in userland. We could provide utilities to simplify testing of rest APIs in our public interface but this is not the case (and FOS\RestBundle\Tests\Functional\WebTestCase does not allow that).