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

Bake table with enums mapped. #969

Merged
merged 3 commits into from
Dec 28, 2023
Merged

Bake table with enums mapped. #969

merged 3 commits into from
Dec 28, 2023

Conversation

dereuromark
Copy link
Member

Follow #968

Currently finds the enums per fields, e.g.

[
  'status' => 'Bake\Test\App\Model\Enum\BakeArticleStatus'
]

This already works, but needs some cleanup
How do we avoid the fqcn for example? Use statements should be used instead.


namespace Bake\Test\App\Model\Table;

use Bake\Test\App\Model\Enum\BakeArticleStatus;
Copy link
Member

Choose a reason for hiding this comment

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

I like this convention. It helps ensure that enums are scoped to the entity so that we don't easily get conflicts.

@dereuromark dereuromark force-pushed the 3.x-bake-table-with-enum branch from b6af28f to 141b704 Compare December 23, 2023 13:59
@ADmad ADmad changed the base branch from 3.x to 3.next December 24, 2023 05:14
@dereuromark dereuromark force-pushed the 3.x-bake-table-with-enum branch 3 times, most recently from ff9a32f to 85cdd3c Compare December 27, 2023 17:49
Makes detection more strict by requiring the looked up words to be
positioned at the end of the field name, and possible leading
characters to be a separator.

refs #957
@dereuromark dereuromark force-pushed the 3.x-bake-table-with-enum branch from 85cdd3c to 386f5b7 Compare December 27, 2023 17:51
@dereuromark
Copy link
Member Author

dereuromark commented Dec 27, 2023

Any idea what to do with the postgres topic?
Found it, apparently there it is 'smallinteger'...

Also, how can we cleanup the FQCN here inside the code?

@dereuromark dereuromark merged commit e7e3c43 into 3.next Dec 28, 2023
7 of 8 checks passed
@dereuromark dereuromark deleted the 3.x-bake-table-with-enum branch December 28, 2023 08:42
@dereuromark dereuromark mentioned this pull request Dec 28, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants