New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Phalcon\Assets\Resource #12082

Closed
sergeyklay opened this Issue Aug 3, 2016 · 5 comments

Comments

Projects
3 participants
@sergeyklay
Copy link
Member

sergeyklay commented Aug 3, 2016

I suggest to rename Resource, beacause it's on soft reserved word of PHP.


To rename:

  • Phalcon\Assets\Resource (Phalcon\Assets\Asset)
  • Phalcon\Assets\Resource\Css (Phalcon\Assets\Asset\Css)
  • Phalcon\Assets\Resource\Js (Phalcon\Assets\Asset\Js)

@sergeyklay sergeyklay added this to the 4.0.0 milestone Aug 3, 2016

@sergeyklay sergeyklay changed the title Rename Phalcon\Assets\Resource Rename Phalcon\Assets\Resource and Phalcon\Acl\Resource Aug 3, 2016

@Jurigag

This comment has been minimized.

Copy link
Member

Jurigag commented Aug 3, 2016

ResourceAware and ResourceInterface don't need renaming though. I think if it's in namespace don't need too, just class names like Resource needs renaming.

How we can remove https://github.com/phalcon/cphalcon/blob/master/phalcon/acl/resourceaware.zep ? The ResourceInterface is for other thing. ResourceInterface is for using with addResource/addRole, ResourceAware for using with isAllowed(like for example models can implement it, and in MANY situations you can have getName() method in model.

@stale

This comment has been minimized.

Copy link

stale bot commented Apr 16, 2018

Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalconphp.com/post/github-closing-old-issues

@stale stale bot added the stale label Apr 16, 2018

@sergeyklay sergeyklay closed this Apr 16, 2018

@sergeyklay sergeyklay reopened this May 2, 2018

@stale stale bot removed the stale label May 2, 2018

niden added a commit to niden/cphalcon that referenced this issue Oct 31, 2018

niden added a commit to niden/cphalcon that referenced this issue Oct 31, 2018

@niden

This comment has been minimized.

Copy link
Member

niden commented Oct 31, 2018

@sergeyklay Renaming the Assets is easy, should have that done reasonably soon.

As far as the ACL is concerned. I propose the following

  • Phalcon\Acl\Resource -> Phalcon\Acl\Subject
  • Phalcon\Acl\ResourceInterface -> Phalcon\Acl\SubjectInterface
  • Phalcon\Acl\ResourceAware -> Phalcon\Acl\SubjectAware

Also if we move to Subject we will have to change the Role as follows

  • Phalcon\Acl\Role -> Phalcon\Acl\Operation
  • Phalcon\Acl\RoleInterface -> Phalcon\Acl\OperationInterface
  • Phalcon\Acl\RoleAware -> Phalcon\Acl\OperationAware

This pretty much changes the verbiage to Subject and Operation two terms that are widely used in the industry when describing access control lists.

@niden

This comment has been minimized.

Copy link
Member

niden commented Oct 31, 2018

@niden niden self-assigned this Oct 31, 2018

@niden niden added this to In progress in 4.0 Release Nov 28, 2018

@niden niden moved this from In progress to To do in 4.0 Release Nov 28, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

[phalcon#12082] - Merge branch '4.0.x' into T12082-resource-rename-2
* 4.0.x: (36 commits)
  [phalcon#13438] - Added docblock
  [phalcon#13438] - Fixed tabs
  [phalcon#13438] - Updated the CHANGELOG
  [phalcon#13438] - More corrections to the interface
  [phalcon#13438] - Corrected interface
  [phalcon#13438] - Work on the Factory; Wrote more tests for it
  [phalcon#13438] - Correction to the syslog adapter; Added more tests
  [phalcon#13438] - Renamed blackhole adapter to noop. Added tests
  [phalcon#13438] - PHPCS
  [phalcon#13438] - Minor corrections to the adapter; Added more tests
  [phalcon#13438] - Work on the syslog adapter
  [phalcon#13438] - Renamed the base folder for the tests
  [phalcon#13438] - Removed logger file adapter; consolidated it in stream. Adjusted tests; Added syslog tests
  [phalcon#13438] - More logger tests
  [phalcon#13438] - Added Stream adapter file tests
  [phalcon#13438] - Corrected some tests; Added more file ones
  [phalcon#13438] - Corrections for the excludeAdapter and inTransaction
  [phalcon#13438] - Correction to the logger trait; Added more tests
  [phalcon#13438] - Added "excludeAdapters" functionality for the logger
  [phalcon#13438] - Sanity check for someone not passing a string
  ...

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

@niden niden changed the title Rename Phalcon\Assets\Resource and Phalcon\Acl\Resource Rename Phalcon\Assets\Resource Dec 7, 2018

@niden niden moved this from To do to In progress in 4.0 Release Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

@niden niden referenced this issue Dec 7, 2018

Merged

T12082 resource rename #13640

3 of 3 tasks complete

niden added a commit to niden/cphalcon that referenced this issue Dec 7, 2018

niden added a commit that referenced this issue Dec 9, 2018

Merge branch 'niden-T12082-resource-rename-2' into 4.0.x
* niden-T12082-resource-rename-2:
  [#12082] - Updated the changelog; reenabled cli/integration
  [#12082] - More tests
  [#12082] - PHPCS
  [#12082] - Added more tests for Assets\Inline
  [#12082] - Temporarily disabling other suites
  [#12082] - Added assets/getContent tests
  [#12082] - PHPCS
  [#12082] - Reset the Di
  [#12082] - Added filter tests
  [#12082] - More assets tests assets\asset
  [#12082] - More tests refactored
  [#12082] - Corrected tests and PHPCS
  [#12082] - Added tests for asset getLocal, getPatha
  [#12082] - Moved old tests in the check folder; Added Asset tests
  [#12082] - [#12082] - Renamed folder
  [#12082] - Renamed Assets\Resource to Assets\Asset
@niden

This comment has been minimized.

Copy link
Member

niden commented Dec 9, 2018

This has been addressed

@niden niden closed this Dec 9, 2018

4.0 Release automation moved this from In progress to Done Dec 9, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 9, 2018

[4.0.x] - Merge remote-tracking branch 'upstream/4.0.x' into 4.0.x
* upstream/4.0.x: (23 commits)
  CLI parameters now work like MVC parameters.
  Fixed Security Tests segmentation fault
  Added retainer for current session token in order to be able to validate fields after regenerating the token. Added string casting to userToken.
  Update di.zep
  Scope SQL Column Aliases (on nesting level)
  Updated HeadersCest to support response:before/afterSendHeaders tests
  Added events response:beforeSendHeaders, response:afterSendHeaders
  [phalcon#12082] - Updated the changelog; reenabled cli/integration
  [phalcon#12082] - More tests
  [phalcon#12082] - PHPCS
  [phalcon#12082] - Added more tests for Assets\Inline
  [phalcon#12082] - Temporarily disabling other suites
  [phalcon#12082] - Added assets/getContent tests
  [phalcon#12082] - PHPCS
  [phalcon#12082] - Reset the Di
  [phalcon#12082] - Added filter tests
  [phalcon#12082] - More assets tests assets\asset
  [phalcon#12082] - More tests refactored
  [phalcon#12082] - Corrected tests and PHPCS
  [phalcon#12082] - Added tests for asset getLocal, getPatha
  ...

niden added a commit to niden/cphalcon that referenced this issue Dec 9, 2018

[phalcon#12098] - Merge branch '4.0.x' into T12098-remove-deprecated-…
…code

* 4.0.x: (23 commits)
  CLI parameters now work like MVC parameters.
  Fixed Security Tests segmentation fault
  Added retainer for current session token in order to be able to validate fields after regenerating the token. Added string casting to userToken.
  Update di.zep
  Scope SQL Column Aliases (on nesting level)
  Updated HeadersCest to support response:before/afterSendHeaders tests
  Added events response:beforeSendHeaders, response:afterSendHeaders
  [phalcon#12082] - Updated the changelog; reenabled cli/integration
  [phalcon#12082] - More tests
  [phalcon#12082] - PHPCS
  [phalcon#12082] - Added more tests for Assets\Inline
  [phalcon#12082] - Temporarily disabling other suites
  [phalcon#12082] - Added assets/getContent tests
  [phalcon#12082] - PHPCS
  [phalcon#12082] - Reset the Di
  [phalcon#12082] - Added filter tests
  [phalcon#12082] - More assets tests assets\asset
  [phalcon#12082] - More tests refactored
  [phalcon#12082] - Corrected tests and PHPCS
  [phalcon#12082] - Added tests for asset getLocal, getPatha
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment