Skip to content

Use 'Acl.' as plugin prefix and pluralized class name in ACL behavior#172

Closed
nook24 wants to merge 9 commits into
cakephp:masterfrom
openITCOCKPIT:master
Closed

Use 'Acl.' as plugin prefix and pluralized class name in ACL behavior#172
nook24 wants to merge 9 commits into
cakephp:masterfrom
openITCOCKPIT:master

Conversation

@nook24
Copy link
Copy Markdown
Contributor

@nook24 nook24 commented Mar 21, 2022

  • The AclBehavior used the singular table name to add the hasMany association which leats to usage of the wrong table.

  • I also replaced App::className() with Acl. because the Acl Plugin was using generic auto generated Cake\ORM\Table instead of Acl\Model\Table\
    I checked some other CakePHP plugins and none of it was using App::className()

Copy link
Copy Markdown
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay in getting back to you, I had the notifications for this repository turned off for some reason.

Comment thread composer.json
@@ -1,5 +1,5 @@
{
"name": "cakephp/acl",
"name": "itnovum/acl",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be reverted in order to be merged.

}

return $this->_table->{$type}->node($ref);
if(property_exists($this->_table, $type)){
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(property_exists($this->_table, $type)){
if (property_exists($this->_table, $type)){

You'll need to apply the code formatting standards. You can do that with vendor/phpcbf src tests

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @markstory sorry for my late response to this.
I have created a new branch to merge the upstream changes. I also executed phpcbf but this had made so many code changes, that I would recommend to do this in a second step.

A TOTAL OF 526 ERRORS WERE FIXED IN 53 FILES

I guess otherwise the diff is getting to large. What do you think?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we can update phpcs separately.

@markstory
Copy link
Copy Markdown
Member

Closing as #180 was merged.

@markstory markstory closed this Aug 30, 2023
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