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

Some migrations not applied / not defined #143

Open
smarek opened this issue Jul 9, 2020 · 3 comments
Open

Some migrations not applied / not defined #143

smarek opened this issue Jul 9, 2020 · 3 comments
Assignees

Comments

@smarek
Copy link

smarek commented Jul 9, 2020

  • Table Table->newEntity() should be migrated to Table->newEmptyEntity(), validating that newEntity() did not originally contain any arguments / data for entity creation
  • Paginator $this->Paginator->counter(['format' => __('format text')]) should be migrated to $this->Paginator->counter(__('format text'))
  • Form public function buildValidator(Event $event, Validator $validator, $name) should be migrated to public function validationDefault(Validator $validator): Validator if the method validationDefault is not yet defined
  • Form public function validate(array $data) should be migrated to public function validate(array $data): bool
  • Form protected function _buildSchema(Schema $schema) should be migrated to protected function _buildSchema(Schema $schema): Schema
  • Form public function getData($field = null) should get migrated to public function getData(?string $field = null)
        $this->paginate = [
            'order' => ['SomeTable.column'],
        ];

should be migrated to

        $this->paginate = [
            'order' => ['SomeTable.column' => 'asc'],
        ];

thus specifically providing order, if it was not provided before

@markstory markstory self-assigned this Jul 14, 2020
@markstory
Copy link
Member

Not all of these are doable with rector, but I can update the 40 rules for the ones we can automatically update.

@TomasVotruba
Copy link

@markstory I've checked them briefle and all can be automated.

@markstory
Copy link
Member

Thanks for letting us know about that @TomasVotruba I'll circle back on this and figure out how to do the other changes.

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