Jan Nedbal
Jan Nedbal
``` php /** * @property null|string $firstname * @property string $surname */ class User extends LeanMapper\Entity { protected function initDefaults() { $this->firstname = NULL; } } //////// $user = new...
Due to [this](https://github.com/nette/http/commit/4ff8e48df92a7fe3b747043012edd057dcf0b5e3) commit, `getRawBody()` will always return NULL, because in ApiRequestFactory [there](https://github.com/drahak/Restful/blob/9cb32de7241c370e42e18cec703f638695650356/src/Drahak/Restful/Http/ApiRequestFactory.php#L43) is no callback passed. Possible quickfix: ``` php public function createHttpRequest() { $request = $this->factory->createHttpRequest(); $url =...
Before commit 7530d8d5b25038564843de024204d540d317c4ed, there was correct 406 code sent, when server didn't understand the Accept header. [Now it sends 415](https://github.com/drahak/Restful/blob/d8df51b1ecca0c1f42f5bcf67bb0368896f84038/src/Drahak/Restful/Application/UI/ResourcePresenter.php#L172), which is [completly different](http://stackoverflow.com/questions/3294483/http-406-and-415-error-codes#answer-3294541). This commit should probably be reverted...
In XML, not every character can be used for tag name. For example spaces are not allowed. Maybe there should be some validation for that. You can easily forget this...
### Bug report See snippet, it says `Strict comparison using === between mixed and null will always evaluate to false.` (which is nonsense) ### Code snippet that reproduces the problem...
Docs of https://github.com/phpstan/phpstan-src/pull/2840
Given this config ```xml ``` And this analysed file ```php
We are iteratively fetching new MRs via: ``` updated_after=2023-01-24T18:05:25.801Z &sort=asc &order_by=updated_at ``` And there is more than 100 MR updated within a second. Current implementation causes the same MRs to...
Currently, inferring numeric types (mainly results of `AVG`, `SUM` etc) is imperfect as [it is currently implemented to serve all configurations](https://github.com/phpstan/phpstan-doctrine/blob/1.4.x/src/Type/Doctrine/Query/QueryResultTypeWalker.php#L841-L842) resulting in union types like `int|numeric-string`. This is painful...