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

Combatible with cake php v4.1 #194

Open
1 of 3 tasks
hkosmidi opened this issue Nov 13, 2020 · 15 comments
Open
1 of 3 tasks

Combatible with cake php v4.1 #194

hkosmidi opened this issue Nov 13, 2020 · 15 comments

Comments

@hkosmidi
Copy link

This is a (multiple allowed):

  • bug

  • enhancement

  • question

  • CakePHP Version: 4.6.1

What you did

I used your plugin with cake php v4.1 but got several errors

What happened

Some functions didn't have proper return type in deceleration and yield errors

What you expected to happen

I have updated the function calls in 2 commits. Could you please check if they are ok. Is there way to merge in your codebase so to use your plugin through composer?
hkosmidi@9c48d65
hkosmidi@3ba820d

@Erwane
Copy link
Collaborator

Erwane commented Nov 16, 2020

did you try this branch ?
https://github.com/Holt59/cakephp3-bootstrap-helpers/tree/cake4-bs4-1.0.0
But it is for bootstrap 4.

@hkosmidi
Copy link
Author

No I haven't. I use bootstrap 3 for now

@Erwane
Copy link
Collaborator

Erwane commented Nov 16, 2020

can you make a PR ? with tests ?
or i can do it if you prefer

@hkosmidi
Copy link
Author

hkosmidi commented Nov 16, 2020

Sorry I have not made any test, I just added the appropriate return types in functions. Feel free of course to merge them if you think the commits are correct

@Holt59
Copy link
Collaborator

Holt59 commented Nov 16, 2020

I've created https://github.com/Holt59/cakephp3-bootstrap-helpers/tree/cake4-bs3-1.0.0 with your two commits. This is 100% untested, I've only cherry-picked your two commits.

You can require it using "holt59/cakephp3-bootstrap-helpers": "dev-cake4-bs3-1.0.0".

@Erwane
Copy link
Collaborator

Erwane commented Nov 16, 2020

I'm trying different notations for this project but i don't know how to maintain 4 versions with comprehensive tags.

one way is
4 branches (cakeX-bsY) with tag attached like this :
4.3.1 is cake4-bs3 version 1.
The risk is a "^4.3" dependency in composer.json apps and the require should be ~4.3.0 to load cake4-bs3 and all fixes

One alternative is tag 43.0.0 for cake4-bs3, 44.0.0 for cake4-bs4 and write documentation to require ^43.0

@Holt59
Copy link
Collaborator

Holt59 commented Nov 16, 2020

I've been thinking about it, and there are multiple issues... I think the best option would be to fork this to a cakephp4-bootstrap-helpers.

We could keep all development here, in custom branch names such as the ones we are using, and only push tags to the cakephp4- repository so there is no issue with composer.

@Erwane
Copy link
Collaborator

Erwane commented Nov 16, 2020

Ok, looks better but what about bootstrap versions ?
version 3.xx for bs3 and 4.xx for bs4 ?
Bootstrap 5 is in beta

@Holt59
Copy link
Collaborator

Holt59 commented Nov 16, 2020

Yes, 3.x.x for bs3, 4.x.x for bs4, etc. It's what's already done.

@Erwane
Copy link
Collaborator

Erwane commented Nov 16, 2020

So here, you keep branches : cake3-bs3, cake4-bs3n cake4-bs4, etc etc
maintain tags for cakephp3 with bootstrap 3 and 4 in 3.x.y and 4.x.y
And push the dev in cake4-bsX branches to new repository cakephp4-bootstrap-helpers with tags 3.x and 4.x for bootstrap versions ?

No PR in the cake4-bootstrap-helpers repository ? This part sound weird.
Logic is to keep cake4 dev in this new repository, and push fixes from cake3 to cake4 no ?

@Holt59
Copy link
Collaborator

Holt59 commented Nov 16, 2020

Well, I'd say its a preference choice, I don't really mind:

  • Either we keep all development here and only push to the Cake 4 repository.
  • Or we separate development, Cake 3 here and Cake 4 on the other repository.

We could completely separate development and only cherry-pick when needed.

I've created the Cake 4 repository and registered it on packagist: https://github.com/Holt59/cakephp4-bootstrap-helpers (the v3.0.0 and v4.0.0 corresponds to the cake4-bs3 and cake4-bs4 branches here).

I've also added you as collaborator to both repository so you should receive an invite.

@Erwane
Copy link
Collaborator

Erwane commented Nov 16, 2020

Thanks, i will check that.
Why v3.0.0 ? you plan to use one branch by fix ?
maybe branch v3.x and tags v3.0.0 for versions ?

@Holt59
Copy link
Collaborator

Holt59 commented Nov 16, 2020

Because that's what it was called here :) But it should be v3.0.x and we should have a v3.x branch:

  • v3.x — Latest development branch for Bootstrap 3.
  • v3.0.x — Bug fixes for release v3.0.x (created after v3.0.0 is released).
  • Similar branches for Bootstrap 4.

I'll remove master and set the v4.x as master for Cake 4 and v3.x as master for Cake 3 — Or I could set v4.x as master for both.

@hkosmidi
Copy link
Author

I also added this commit hkosmidi@8b0d5db in order for DateTimeWidget to play along. Hope this helps

@Erwane
Copy link
Collaborator

Erwane commented Jan 18, 2021

The cake4 support will be moved to this repository. https://github.com/Holt59/cakephp4-bootstrap-helpers
And this PR should fix Helpers initialization CakePHP-Bootstrap/cakephp4-bootstrap-helpers#3

Waiting for @Holt59

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

No branches or pull requests

3 participants