Skip to content

Commit

Permalink
Move away from v3 branding, as migrator now technically requires ^4.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseleite committed May 9, 2023
1 parent fe7b999 commit 93ed208
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Statamic Migrator

![Statamic 3.0+](https://img.shields.io/badge/Statamic-3.0+-FF269E?style=for-the-badge&link=https://statamic.com)
![Statamic 4.0+](https://img.shields.io/badge/Statamic-4.0+-FF269E?style=for-the-badge&link=https://statamic.com)

🤘 Make migrating from v2 to v3 all the moar easier!
🤘 Make migrating from v2 all the moar easier!

📺 See the migrator in action [in this screencast](https://youtu.be/OeXbaeuJrws).

Expand All @@ -26,7 +26,7 @@

The site migrator is the recommended way to migrate your site. To get started...

1) Install a fresh instance of [Statamic v3](https://statamic.dev/installation) in a new location, and require the migrator:
1) Install a fresh instance of [Statamic](https://statamic.dev/installation) in a new location, and require the migrator:

```
composer require statamic/migrator --dev --with-all-dependencies
Expand All @@ -40,7 +40,7 @@ The site migrator is the recommended way to migrate your site. To get started..

3) Ensure you are running the latest version of Statamic in your v2 project.

4) Copy your v2 project's `site` folder, as well as any local asset container folders, into the root of your v3 project.
4) Copy your v2 project's `site` folder, as well as any local asset container folders, into the root of your new project.

- If you were running above webroot, be sure to copy your `public/themes` folder into `site/themes` as well.

Expand All @@ -60,7 +60,7 @@ The site migrator is the recommended way to migrate your site. To get started..

- While we hope to automate most of the common tedious stuff for you, anything more custom may need to be manually migrated. Checkout the [upgrade guide](https://statamic.dev/upgrade-guide) for more info on breaking changes.

8) When you are finished and happy, feel free to delete your `site` and asset container folders from your v3 project root, and then run the following commands:
8) When you are finished and happy, feel free to delete your `site` and asset container folders from your new project's root, and then run the following commands:

```
composer remove statamic/migrator --dev
Expand All @@ -77,7 +77,7 @@ If you require a more granular approach, you may also run the individual migrato

### Fieldset to blueprint migrator

In v3, [blueprints](https://statamic.dev/blueprints) are the replacement to fieldsets. It's worth noting that [fieldsets](https://statamic.dev/fieldsets) technically still exist, although they are a now a smaller, companion feature to blueprints. To migrate a fieldset to a blueprint:
In v3+, [blueprints](https://statamic.dev/blueprints) are the replacement to fieldsets. It's worth noting that [fieldsets](https://statamic.dev/fieldsets) technically still exist, although they are a now a smaller, companion feature to blueprints. To migrate a fieldset to a blueprint:

```
php please migrate:fieldset post
Expand All @@ -87,7 +87,7 @@ In this example, `post` is the fieldset handle.

### Collection migrator

In v3, collections have a slightly different folder and config structure. To migrate a collection:
In v3+, collections have a slightly different folder and config structure. To migrate a collection:

```
php please migrate:collection blog
Expand All @@ -97,15 +97,15 @@ In this example, `blog` is the collection handle.

### Pages migrator

In v3, pages are now stored as a [collection](https://statamic.dev/collections-and-entries), with a separate [structure](https://statamic.dev/structures) to manage your page tree hierarchy. To migrate your pages:
In v3+, pages are now stored as a [collection](https://statamic.dev/collections-and-entries), with a separate [structure](https://statamic.dev/structures) to manage your page tree hierarchy. To migrate your pages:

```
php please migrate:pages
```

### Taxonomy migrator

In v3, taxonomies are mostly plug-and-play, apart from a few minor changes to config structure. To migrate a taxonomy:
In v3+, taxonomies are mostly plug-and-play, apart from a few minor changes to config structure. To migrate a taxonomy:

```
php please migrate:taxonomy tags
Expand All @@ -115,7 +115,7 @@ In this example, `tags` is the taxonomy handle.

### Asset container migrator

In v3, assets and related meta data are now stored within a [Laravel filesystem](https://laravel.com/docs/6.x/filesystem). To migrate a local asset container, you will need to copy your assets folder into your v3 project root, along side your `site` folder. You can skip this step if migrating an S3 based container. Once ready, run the following command:
In v3+, assets and related meta data are now stored within a [Laravel filesystem](https://laravel.com/docs/6.x/filesystem). To migrate a local asset container, you will need to copy your assets folder into your new project's root, along side your `site` folder. You can skip this step if migrating an S3 based container. Once ready, run the following command:

```
php please migrate:asset-container main
Expand All @@ -125,7 +125,7 @@ In this example, `main` is the asset-container handle.

### Globals migrator

In v3, globals are mostly plug-and-play. To migrate a global set:
In v3+, globals are mostly plug-and-play. To migrate a global set:

```
php please migrate:global-set global
Expand All @@ -135,7 +135,7 @@ In this example, `global` is the global set handle.

### Form migrator

In v3, forms fields are now defined in a [blueprint](https://statamic.dev/blueprints). To migrate a form and it's submissions:
In v3+, forms fields are now defined in a [blueprint](https://statamic.dev/blueprints). To migrate a form and it's submissions:

```
php please migrate:form contact
Expand All @@ -145,7 +145,7 @@ In this example, `contact` is the form handle.

### User migrator

In v3, users are mostly plug-and-play. The most notable change being that `email` now replaces `username` as the new file name and handle. To migrate a user:
In v3+, users are mostly plug-and-play. The most notable change being that `email` now replaces `username` as the new file name and handle. To migrate a user:

```
php please migrate:user hasselhoff
Expand All @@ -155,33 +155,33 @@ In this example, `hasselhoff` is the username handle.

### Roles migrator

In v3, roles are mostly plug-and-play. The most notable change being that roles are keyed by a slug handle, instead of by uuid. It's worth noting that the user migrator takes care of this relationship on the user end as well. To migrate your user roles:
In v3+, roles are mostly plug-and-play. The most notable change being that roles are keyed by a slug handle, instead of by uuid. It's worth noting that the user migrator takes care of this relationship on the user end as well. To migrate your user roles:

```
php please migrate:roles
```

### Groups migrator

In v3, groups are mostly plug-and-play. The most notable change being that groups are keyed by a slug handle, instead of by uuid. Also, we've removed the `users` array from each group, in favor of storing a `groups` relationship on the user itself. It's worth noting that the user migrator takes care of this new relationship on the user end. To migrate your user groups:
In v3+, groups are mostly plug-and-play. The most notable change being that groups are keyed by a slug handle, instead of by uuid. Also, we've removed the `users` array from each group, in favor of storing a `groups` relationship on the user itself. It's worth noting that the user migrator takes care of this new relationship on the user end. To migrate your user groups:

```
php please migrate:groups
```

### Settings migrator

In v3, site settings are now stored in a conventional Laravel [config directory](https://statamic.dev/configuration). To migrate your site settings:
In v3+, site settings are now stored in a conventional Laravel [config directory](https://statamic.dev/configuration). To migrate your site settings:

```
php please migrate:settings
```

Due to the fact that settings vary between v2 and v3, we cannot guarantee a complete migration of your settings, but we attempt to update the most obvious stuff for you. Be sure to double check that all of your important settings were migrated as needed!
Due to the fact that settings vary between v2 and v3+, we cannot guarantee a complete migration of your settings, but we attempt to update the most obvious stuff for you. Be sure to double check that all of your important settings were migrated as needed!

### Theme migrator

In v3, [the concept of 'themes' is gone](https://statamic.dev/upgrade-guide#theming-and-views). Your site just has the one, and it's in the `resources` directory. When running a full site migration, we only attempt the migration of your active theme. However, you can specify any theme handle when running this migrator individually:
In v3+, [the concept of 'themes' is gone](https://statamic.dev/upgrade-guide#theming-and-views). Your site just has the one, and it's in the `resources` directory. When running a full site migration, we only attempt the migration of your active theme. However, you can specify any theme handle when running this migrator individually:

```
php please migrate:theme redwood
Expand All @@ -195,4 +195,4 @@ Due to the evolution of antlers templating, we cannot guarantee a complete migra

## Reporting issues

While we hope to automate most of the common tedious stuff for you, anything more custom may need to be manually migrated. For this reason, we recommend getting familiar with the [upgrade guide](https://statamic.dev/upgrade-guide). Though we can't automate everything, hopefully you have found this package useful in your transition to v3. If you come across a bug or issue that you think needs to be addressed, please [open an issue](https://github.com/statamic/migrator/issues/new).
While we hope to automate most of the common tedious stuff for you, anything more custom may need to be manually migrated. For this reason, we recommend getting familiar with the [upgrade guide](https://statamic.dev/upgrade-guide). Though we can't automate everything, hopefully you have found this package useful in your transition to v3+. If you come across a bug or issue that you think needs to be addressed, please [open an issue](https://github.com/statamic/migrator/issues/new).
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"extra": {
"statamic": {
"name": "Migrator",
"description": "Statamic v2 to v3 migration helper"
"description": "Statamic v2 migration helper"
},
"laravel": {
"providers": [
Expand Down
2 changes: 1 addition & 1 deletion src/FieldsetMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected function parseFieldset()
}

/**
* Migrate v2 fieldset schema to v3 blueprint schema.
* Migrate v2 fieldset schema to new blueprint schema.
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion src/FormMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected function parseForm()
}

/**
* Migrate default v2 form schema to default v3 schema.
* Migrate default v2 form schema to new schema.
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion src/GlobalSetMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function parseGlobalSet($relativePath)
}

/**
* Migrate default v2 global set schema to default v3 schema.
* Migrate default v2 global set schema to new schema.
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ThemeMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected function migrateTemplates()

$this->addWarning(
"Your [{$this->handle}] theme templates have been migrated to [resources/views].",
'It\'s worth noting that Antlers templating has undergone a number of changes. Many of these changes are opinionated and will need your attention (please refer to [https://statamic.dev/upgrade-guide] for an overview of the most breaking changes). Your theme\'s front end assets and build pipelines will also need to be manually migrated. We recommend checking out Laravel Mix if you are building your assets (Mix comes pre-installed into your v3 apps, and documentation is available at [https://laravel.com/docs/mix]).'
'It\'s worth noting that Antlers templating has undergone a number of changes. Many of these changes are opinionated and will need your attention (please refer to [https://statamic.dev/upgrade-guide] for an overview of the most breaking changes). Your theme\'s front end assets and build pipelines will also need to be manually migrated. We recommend checking out Laravel Mix if you are building your assets (Mix comes pre-installed into your v3+ apps, and documentation is available at [https://laravel.com/docs/mix]).'
);

return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/UserMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function setNewPathWithEmailAsHandle()
}

/**
* Migrate default v2 user schema to default v3 schema.
* Migrate default v2 user schema to new schema.
*
* @return $this
*/
Expand Down

0 comments on commit 93ed208

Please sign in to comment.