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

Remove Illuminate dependencies #20

Closed
wants to merge 6 commits into from

Conversation

alwaysblank
Copy link

This removes the internal dependencies on the Illuminate helpers assumed to be provided by Sage 9/10. With this change, Navi should now be usable in any WordPress environment. I've done some minimal testing on an existing project, but more testing would certainly be wise.

This would represent a ⚠️ breaking change ⚠️ if implemented: It strips out all Fluent functionality, so any user implementation depending on Fluent methods will immediately explode. If this is a real no-go, then I can look at just manually copying over the classes, etc, since we want to avoid any dependencies (and thus dependency hell w/ relatively popular packages). I left that out in this initial PR for the following reasons:

  1. Navi is light, and I'd like to see it stay light
  2. The use case(s) described in the Readme are still supported with this version (most of them involve getting an array out of Navi ultimately anyway and now it just uses arrays internally instead of collections)
  3. It would feel gross to do that

Also of note:
I've added a method called getItems() which returns an array of items (i.e. you'd use it as toArray() is used in the original examples). I did this because toArray() makes no semantic sense when all internal data is now arrays. However I have added a toArray() method as well that just returns getItems() to make the transition from older user implementations a little easier.

Let me know if you'd like me to make any changes or take it in a different direction.

@Log1x Log1x self-requested a review August 2, 2020 22:16
@Log1x Log1x self-assigned this Aug 2, 2020
Log1x added a commit that referenced this pull request Feb 14, 2021
@Log1x Log1x closed this Feb 14, 2021
Log1x added a commit that referenced this pull request Feb 14, 2021
* chore(docs): Update license
* chore(docs): Update README
* chore(docs): Update README links
* enhance(docs): Add instructions for installing as a plugin
* enhance(docs): Add usage example for vanilla themes
* enhance(docs): Improve documentation custom field examples (Supersedes #27)
* enhance(docs): Move theme usage into `examples/` folder
* feat(ci): Add GitHub action to package Navi as a plugin
* feat(ci): Switch to GitHub actions
* feat(navi): Add support for WPML (Fixes #18)
* feat(navi): Allow Navi to be used as a plugin
* feat(navi): Lower minimum PHP version to 7.0
* feat(navi): Remove dependency on Roots Sage
* feat(navi): Remove Illuminate dependencies (Supersedes #20)
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.

None yet

2 participants