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

Packagist preparations #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 6 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,20 @@

Apply automatic fixes on your Drupal 8 code.

Check it in action on [Travis CI](https://travis-ci.org/drupal8-rector/drupal8-rector/builds).

## Installation

Install the library.

```bash
$ composer require --dev drupal8-rector/drupal8-rector
$ composer require --dev palantirnet/drupal8-rector
```

Create a rector.yml file in the Drupal 8 root.

```yml
imports:
- { resource: "%vendor_dir%/drupal8-rector/drupal8-rector/config/drupal8.yml" }
- { resource: "%vendor_dir%/drupal8-rector/drupal8-rector/config/drupal86-deprecations.yml" }
# Import drupal8-php71.yml ruleset if your module's minimum requirement
# is PHP >= 7.1.
# - { resource: "%vendor_dir%/drupal8-rector/drupal8-rector/config/drupal8-php71.yml" }
# Enable EXPERIMENTAL rectors.
# - { resource: "%vendor_dir%/drupal8-rector/drupal8-rector/config/drupal8-experimental.yml" }
- { resource: "vendor/palantirnet/drupal8-rector/config/drupal8.yml" }
# - { resource: "config/drupal8.yml" }

parameters:
autoload_paths:
Expand All @@ -33,11 +26,8 @@ parameters:
- '*/Tests/*'

services:
# Optionally enable ReturnTypeDeclarationRector rector if your
# code is PHP >= 7.1 compatible. It is disabled by default
# because it may cause problems.
# Drupal8Rector\Rector\FunctionLike\ReturnTypeDeclarationRectorProxy: ~
```

# Suggested workflow

1. Analyze your code with Rector and review suggested changes:
Expand Down Expand Up @@ -71,10 +61,6 @@ $ vendor/bin/phpunit -c web/core --printer="\Drupal\Tests\Listeners\HtmlOutputPr

You can find more information about Rector [here](https://github.com/rectorphp/rector).

## Known issues

* Rector conflict with the PHPUnit version (^6.5 required by webflo/drupal-core-require-dev package) on the required minimum version from sebastian/diff package. Possible solution: temporarily remove webflo/drupal-core-require-dev package while you are testing this library.

## Roadmap

This is just a POC at this moment but it has a great potential to become an actual development tool for Drupal 8.
Expand All @@ -83,4 +69,5 @@ This is just a POC at this moment but it has a great potential to become an actu

## Credits

Initial development is sponsored by [Pronovix](https://pronovix.com).
Initial development is sponsored by [Pronovix](https://pronovix.com).<br/>
Additional development is sponsored by [Palantir.net](https://www.palantir.net).
13 changes: 12 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "drupal8-rector/drupal8-rector",
"name": "palantirnet/drupal8-rector",
"description": "Instant fixes for your Drupal 8 code by using Rector.",
"type": "library",
"keywords": [
Expand All @@ -21,6 +21,14 @@
{
"name": "Dezső Biczó",
"email": "[email protected]"
},
{
"name": "Ofer Shaal",
"email": "[email protected]"
},
{
"name": "Daniel Montgomery",
"email": "[email protected]"
}
],
"autoload": {
Expand All @@ -34,6 +42,9 @@
"preferred-install": "dist",
"sort-packages": true
},
"replace": {
"drupal8-rector/drupal8-rector": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion rector.dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
imports:
# - { resource: "vendor/drupal8-rector/drupal8-rector/config/drupal8.yml" }
# - { resource: "vendor/palantirnet/drupal8-rector/config/drupal8.yml" }
- { resource: "config/drupal8.yml" }

parameters:
Expand Down
2 changes: 1 addition & 1 deletion rector.main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
imports:
- { resource: "vendor/drupal8-rector/drupal8-rector/config/drupal8.yml" }
- { resource: "vendor/palantirnet/drupal8-rector/config/drupal8.yml" }
# - { resource: "config/drupal8.yml" }

parameters:
Expand Down
2 changes: 1 addition & 1 deletion rector.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
imports:
- { resource: "vendor/drupal8-rector/drupal8-rector/config/drupal8.yml" }
- { resource: "vendor/palantirnet/drupal8-rector/config/drupal8.yml" }
# - { resource: "config/drupal8.yml" }

parameters:
Expand Down