sonata-project / dev-kit

Development kit of the Sonata-Project
https://master-7rqtwti-ptm4dx6rjpjko.eu-5.platformsh.site/
42 stars 42 forks source link

[RFC] Remove mapping and use vendor names directly #880

Closed OskarStark closed 4 years ago

OskarStark commented 4 years ago

We have the following mapping: https://github.com/sonata-project/dev-kit/blob/54e537e6660e3c59eb6dfcaac74bc897486d3466/config/dev-kit.yml#L49-L58

In my opinion this just increases cognitive load and does not bring any value, I would rather use them in the projects.yaml

doctrine-mongodb-admin-bundle:
  branches:
    master:
      php: ['7.2', '7.3', '7.4']
      services: [mongodb]
      versions:
-        symfony: ['4.4']
+        symfony/symfony: ['4.4']
-        sonata_admin: ['3']
+        sonata-project/admin-bundle: ['3']

and validate the vendor name with a regex, matching vendor/package.

WDYT?

@greg0ire maybe you can remember, why we did this mapping in the past?

greg0ire commented 4 years ago

That was introduced in #67, let's see if there is a comment on that.

greg0ire commented 4 years ago

See https://github.com/sonata-project/dev-kit/pull/67/files#r481786080

OskarStark commented 4 years ago

Yes it was used to have proper env variables like $SYMFONY, but this was only need on Travis, we don't need it anymore with GithubActions

greg0ire commented 4 years ago

Great then, we can safely get rid of them.

OskarStark commented 4 years ago

Will provide a PR 👍

OskarStark commented 4 years ago

Which one do you prefer?

  branches:
    master:
      php: ['7.3', '7.4']
      variants:
        - { package: 'symfony/symfony', version: '4.4' }
        - { package: 'sonata-project/block-bundle', version: '4' }
    3.x:
      php: ['7.2', '7.3', '7.4']
      variants:
        - package: 'symfony/symfony'
          version: '4.4'
        - package: 'sonata-project/block-bundle'
          version: '3'

or more simple like:

  branches:
    master:
      php: ['7.3', '7.4']
      variants:
        - 'symfony/symfony:4.4'
        - 'sonata-project/block-bundle:4'

Which one do you prefer?

OskarStark commented 4 years ago

I prefer the last one

greg0ire commented 4 years ago

How about this?

  branches:
    master:
      php: ['7.3', '7.4']
      variants:
        'symfony/symfony': '4.4'
        'sonata-project/block-bundle': '4'
OskarStark commented 4 years ago

This is better, otherwise we cannot test more than one version of the same package:

  branches:
    master:
      php: ['7.3', '7.4']
      variants:
        'symfony/symfony': ['4.4']
        'sonata-project/block-bundle': ['4']