Skip to content
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

Fix unsetting offset #124

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

filips123
Copy link
Collaborator

Fixes unsetting offset. Fixes #123.

Methods unset, offsetUnset and remove now delete offset from data and cache array. I used 1. solution from here.

We should now discuss if changing the interface is really such a breaking change. Are there actually any developers who actually implemented their own AbstractConfig? We can probably release as the minor/normal version, but just add in the release notes that interface is changed.

@filips123
Copy link
Collaborator Author

There is a problem with this. Problem is (probably) that unset is keyword so it can't be used as a method name for AbstractConfig in old PHP versions (PHP 5). Fix for this is to rename unset to remove or delete.

@peter279k
Copy link
Contributor

There is a problem with this. Problem is (probably) that unset is keyword so it can't be used as a method name for AbstractConfig in old PHP versions (PHP 5). Fix for this is to rename unset to remove or delete.

This will let php-5.5 and php-5.6 can be passed on Travis CI build :).

@DavidePastore
Copy link
Collaborator

We should now discuss if changing the interface is really such a breaking change. Are there actually any developers who actually implemented their own AbstractConfig? We can probably release as the minor/normal version, but just add in the release notes that interface is changed.

I think that creating a new major release here is the best choice, but if you think that I'm wrong let's discuss about it. 😄 I'm just trying to adhere to the Semantic Versioning rules for major release:

MAJOR version when you make incompatible API changes

There is a problem with this. Problem is (probably) that unset is keyword so it can't be used as a method name for AbstractConfig in old PHP versions (PHP 5). Fix for this is to rename unset to remove or delete.

I agree that we can rename it to remove for example.

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.

Method offsetUnset does not remove key
3 participants