Skip to content

Rector removes executable flag from php scripts #1399

@endelwar

Description

@endelwar

I have some php script with executable flag (i.e. chmod +x file.php) and this flag is removed when I run vendor/bin/rector process ..
rector.yaml is very simple:

parameters:
  php_version_features: '7.2'
  exclude_paths:
    - vendor
    - var
    - cache
  exclude_rectors:
    - 'Rector\CodeQuality\Rector\Identical\SimplifyBoolIdenticalTrueRector'
    - 'Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector'
services:
  Rector\Php\Rector\FuncCall\CountOnNullRector: ~

Running v0.4.12 on php 7.2.17

git diff sample output:

diff --git a/bin/console.php b/bin/console.php
old mode 100755
new mode 100644
diff --git a/bin/fakerize.php b/bin/fakerize.php
old mode 100755
new mode 100644
diff --git a/bin/fetchGoogleData.php b/bin/fetchGoogleData.php
old mode 100755
new mode 100644

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions