cors-psr7 icon indicating copy to clipboard operation
cors-psr7 copied to clipboard

Small misleading in init factory method

Open ybelenko opened this issue 3 years ago • 1 comments

Trying to setup package in PHP-DI container and seems like I've found small mistake in init method.

https://github.com/neomerx/cors-psr7/blob/0f968523b0b8215540915464aed08c5c4a4bf8b5/src/Strategies/Settings.php#L158-L159

Second setAllowedOrigins([]) overwrites areAllOriginsAllowed to false value, then enableAllOriginsAllowed() makes no sense one line before.

ybelenko avatar Apr 20 '21 12:04 ybelenko

It took me quite some time before I notice that setAllowedOrigins sets areAllOriginsAllowed back to false. Removing that line would make it more intuitive.

vbargl avatar Jun 10 '21 20:06 vbargl

It is more like a sample of available options. Same for a few methods below. I will leave only the version that keep backwards compatibility in the next version.

neomerx avatar Sep 29 '22 15:09 neomerx

Released in https://github.com/neomerx/cors-psr7/releases/tag/3.0.0

neomerx avatar Oct 03 '22 04:10 neomerx