Skip to content

Patch to ticket 1079: http://cakephp.lighthouseapp.com/projects/42648/tickets/1079-choking-on-complex-virtual-fields#1

Closed
geon wants to merge 2 commits intocakephp:masterfrom
geon:master
Closed

Patch to ticket 1079: http://cakephp.lighthouseapp.com/projects/42648/tickets/1079-choking-on-complex-virtual-fields#1
geon wants to merge 2 commits intocakephp:masterfrom
geon:master

Conversation

@geon
Copy link
Copy Markdown

@geon geon commented Sep 5, 2010

No description provided.

@markstory
Copy link
Copy Markdown
Member

Thanks for the patch, #1079 is closed now, closing this pull request. I forgot to close it back when the ticket was closed.

predominant added a commit that referenced this pull request Oct 22, 2011
add some ISO-2022-JP based tests, and fixed CakeEmail encode convert problem.
markstory pushed a commit that referenced this pull request Oct 28, 2013
juanibanes pushed a commit to Fragment/CakePHP that referenced this pull request Feb 7, 2014
markstory pushed a commit that referenced this pull request Apr 2, 2014
Added test case for : chars in sequence
ghost pushed a commit to HaroldPutman/cakephp that referenced this pull request Apr 24, 2014
This is closer to the actual problem. The error message will look something like this
```
[24-Apr-2014 09:35:03 UTC] PHP Notice:  Undefined variable: argv in ***/app/Console/cake.php on line 35
[24-Apr-2014 09:35:03 UTC] PHP Fatal error:  Uncaught exception 'Exception' with message '$argv must be an array. Check CLI configuration.' in ***/lib/Cake/Console/ShellDispatcher.php:66
Stack trace:
#0 ***/app/Console/cake.php(35): ShellDispatcher::run(NULL)
cakephp#1 {main}
  thrown in ***/lib/Cake/Console/ShellDispatcher.php on line 66
```
lorenzo pushed a commit that referenced this pull request Dec 26, 2014
Update to the new version of CakePHP
markstory pushed a commit that referenced this pull request Feb 5, 2015
markstory pushed a commit that referenced this pull request Mar 12, 2015
markstory pushed a commit that referenced this pull request Apr 3, 2015
markstory pushed a commit that referenced this pull request Apr 23, 2015
Update TimeTest.php, add testTimeAgoInWordsTimezone
@kallep87 kallep87 mentioned this pull request Apr 29, 2015
@ghost ghost mentioned this pull request May 12, 2015
markstory pushed a commit that referenced this pull request Apr 24, 2018
markstory pushed a commit that referenced this pull request May 7, 2018
merging from the main fork.
@frent frent mentioned this pull request Sep 24, 2018
1 task
tenkoma added a commit to tenkoma/cakephp that referenced this pull request Nov 11, 2018
@ghost ghost mentioned this pull request Oct 9, 2019
1 task
swiffer referenced this pull request Aug 7, 2020
loadConfig() is already called from constructor.
kiang added a commit to kiang/cakephp that referenced this pull request Jan 20, 2021
In PHP 8.0.1 (Ubuntu), it's not possible to execute any command as it would return this error:
Error: ReflectionMethod::__construct(): Argument cakephp#2 ($method) cannot be null when argument cakephp#1 ($objectOrMethod) is an object

Just add the fix to prevent empty value in hasMethod().
markstory pushed a commit that referenced this pull request Mar 11, 2022
Exception: unlink(): Argument #1 ($filename) must be of type string, bool given
In [/home/wotanabx/webseiten/wow-das/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php, line 227]

2022-03-11 02:32:30 error: [TypeError] unlink(): Argument #1 ($filename) must be of type string, bool given in /home/wotanabx/webseiten/wow-das/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php on line 227
dereuromark referenced this pull request in dereuromark/cakephp Nov 25, 2025
When deserializing TableSchema, the foreach loop keys may be integers
if the serialized data was corrupted or came from a different source.
This causes a TypeError in methods like constraints() which return
array_keys() and expect string keys.

The fix casts the name to string for columns, indexes, and constraints
in __unserialize() to ensure type safety.

Fixes issue where FixtureHelper::getForeignReferences() throws:
"TypeError: TableSchema::getConstraint(): Argument #1 (\$name) must be
of type string, int given"
markstory pushed a commit that referenced this pull request Nov 25, 2025
When deserializing TableSchema, the foreach loop keys may be integers
if the serialized data was corrupted or came from a different source.
This causes a TypeError in methods like constraints() which return
array_keys() and expect string keys.

The fix casts the name to string for columns, indexes, and constraints
in __unserialize() to ensure type safety.

Fixes issue where FixtureHelper::getForeignReferences() throws:
"TypeError: TableSchema::getConstraint(): Argument #1 (\$name) must be
of type string, int given"
ADmad pushed a commit that referenced this pull request Feb 24, 2026
)

* WIP: Add proper generic type annotations to fix PHPStan missingType.generics

This is a work-in-progress to properly specify generic types instead of
ignoring the missingType.generics errors in PHPStan.

Changes include:
- Add @template annotations to Helper, View subclasses, Cache classes
- Add proper generic type parameters to method signatures
- Fix Collection, ORM, Event system generic types

Progress: ~210 of 405 errors fixed (52%)

Remaining work needed for complete fix.

* Additional fixes from parallel agents

* Fix remaining missingType.generics errors

Complete the fix for generic type annotations by:
- Add generic types to Association.php methods (attachTo, find, etc.)
- Add @phpstan-ignore for self-referential generics in EventDispatcherTrait
- Fixes all remaining missingType.generics errors

Remaining 69 errors are different types (return.type, argument.type,
generics.interfaceConflict) not related to the original missingType.generics issue.

* Fix PHPStan errors to make CI green

- Add @phpstan-ignore comments for Collection return type mismatches
- Add path-specific ignores for generics.interfaceConflict in TreeIterator/TreePrinter
- Add path-specific ignores for argument.type covariance issues in Cache/ORM
- Use consistent SelectQuery generic types in Association.php

* Move argument.type ignores to inline comments

- Cache.php: inline ignore for NullEngine fallback
- TableRegistry.php: inline ignore for TableLocator
- bootstrap.php: inline ignore for TableLocator

generics.interfaceConflict must remain in config (PHPStan limitation
for class-level interface conflicts)

* Improve inline ignore comments wording

* Fix phpcs violations

- Remove unused import EntityInterface from EagerLoader
- Remove @inheritdoc when combined with @param/@return (coding standard violation)
- Add proper type hints and @param annotations

* Merge pull request #1 from rochamarcelo/suggestions-generic-usage-on-view

Suggestions  for generic usage on view

* Cleanup.

* use static instead of self used generic template on command (#2)

* use static instead of self used generic template

* use static instead of self used generic template

* Fix PHPStan errors in ORM association cascade delete methods

Add @phpstan-ignore for argument.type errors where cascade callback
code iterates over query results. The SelectQuery template includes
array type for non-hydrated results, but cascade callbacks always
use hydration, so entities are guaranteed.

---------

Co-authored-by: Marcelo Rocha <[email protected]>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants