Uploaded image for project: 'PHP ORMs'
  1. PHP ORMs
  2. PHPORM-216

Remove support for Model::$collection. $table is fine

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • laravel-5.0.0
    • Affects Version/s: None
    • Component/s: Laravel
    • None
    • PHP Drivers
    • Needed
    • Hide

      Update the doc examples from all the old version to use "$table" instead of "$collection".

       

      Maybe write an upgrade guide.

      Show
      Update the doc examples from all the old version to use "$table" instead of "$collection".   Maybe write an upgrade guide.

      Laravel uses the property $table to customize the table name. In Laravel-MongoDB, you can use both $table or $collection for this.
      We can deprecate support for $collection in v4.last and remote it in v5.
      Provide a Rector rule to make the update would be easy.

      For reference, we were close to a breaking change https://github.com/laravel/framework/pull/52186

      https://github.com/laravel/framework/pull/52171#discussion_r1683412186

            Assignee:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Reporter:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: