Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Workflow] Make PropertyAccess required dependency #19849

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

Merged
merged 1 commit into from
Sep 5, 2016
Merged

[Workflow] Make PropertyAccess required dependency #19849

merged 1 commit into from
Sep 5, 2016

Conversation

OndraM
Copy link
Contributor

@OndraM OndraM commented Sep 4, 2016

Q A
Branch? master (3.2 is not yet released)
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? N/A
Fixed tickets N/A
License MIT
Doc PR N/A

Hi, when using Workflow as a standalone component (and instantiating new Workflow() instance), I'm getting errors like:

PHP Fatal error:  Class 'Symfony\Component\PropertyAccess\PropertyAccess' not found in .../workflow-example/vendor/symfony/workflow/MarkingStore/PropertyAccessorMarkingStore.php on line 37

The reason is the PropertyAccessorMarkingStore (and the ScalarMarkingStore as well) uses PropertyAccess class. So it is basically not possible to use the component without the symfony/property-access.

Is this correct @lyrixx?

@xabbuh
Copy link
Member

xabbuh commented Sep 5, 2016

👍

Status: Reviewed

@dunglas
Copy link
Member

dunglas commented Sep 5, 2016

It's necessary only for default Marking Store implementations. If you use custom implementations, you may not want this package. A suggest entry would be enough WDYT?

@OndraM
Copy link
Contributor Author

OndraM commented Sep 5, 2016

@dunglas Hypothetically, yes, however - as a newcomer who wants to use the component, this is either not the best first impression - you install the symfony/workflow, implement the Hello world, and it fails on fatal error... And both of the default implementations requires it (so I guess 99% of usages would require it). But I see your point, so the decision whats the best is up to you :).

@dunglas
Copy link
Member

dunglas commented Sep 5, 2016

I've no strong opinion about that. It was just some thought. We have basically 2 possibilities:

  1. merge this PR
  2. make it clear in the doc that PropertyInfo must also be installed manually to use the default implementation

@fabpot
Copy link
Member

fabpot commented Sep 5, 2016

Thank you @OndraM.

@fabpot fabpot merged commit 5957412 into symfony:master Sep 5, 2016
fabpot added a commit that referenced this pull request Sep 5, 2016
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Workflow] Make PropertyAccess required dependency

| Q             | A
| ------------- | ---
| Branch?       | master (3.2 is not yet released)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | N/A
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Hi, when using Workflow as a standalone component (and instantiating new `Workflow()` instance), I'm getting errors like:

```
PHP Fatal error:  Class 'Symfony\Component\PropertyAccess\PropertyAccess' not found in .../workflow-example/vendor/symfony/workflow/MarkingStore/PropertyAccessorMarkingStore.php on line 37
```

The reason is the PropertyAccessorMarkingStore (and the ScalarMarkingStore as well) [uses](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Workflow/MarkingStore/PropertyAccessorMarkingStore.php#L14) PropertyAccess class. So it is basically not possible to use the component without the symfony/property-access.

Is this correct @lyrixx?

Commits
-------

5957412 [Workflow] Make PropertyAccess required dependency
@fabpot fabpot mentioned this pull request Oct 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants