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

Alternate hotfix for #108 - windows path length limitations #172

Merged
merged 43 commits into from
Sep 28, 2014

Conversation

Ocramius
Copy link
Owner

See #108 - the branch name says pretty much everything.

Interesting side-effects though:

  • no more non-ascii chars in class name, as the proxy parameters are hashed
  • ability to sign code with crypto-level secure asymmetric keys, if needed (not implemented, but the new interfaces allow for this feature)
  • shorter class names
  • proxy-generation bound to ProxyManager version (forces re-generation of proxies)

@Ocramius
Copy link
Owner Author

Ping @malukenho for review :-)

@Ocramius Ocramius added this to the 1.0.0 milestone Sep 21, 2014
@Ocramius Ocramius added the bug label Sep 21, 2014
@Ocramius Ocramius self-assigned this Sep 23, 2014
$signature = $this->signatureGenerator->generateSignature($parameters);
$defaultProperties = $class->getDefaultProperties();

//die(var_dump($defaultProperties, $propertyName, $class->getProperties(), $class->getName()));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove debug constructions from the source code

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoooops! Thanks for noticing :-)

@lisachenko
Copy link

I want to say, that this PR is much bigger than expected by issue name ) So many classes, aka Java-style, for solving simple root cause in bf7321b.

As a developer I like this PR, because it's logical and implemented step-by-step. But as an architect, I want to reject it, because it violates KISS principle by overusing SRP principle for simple tasks (SignatureGenerator, SignatureChecker, ParameterHasher).

So, 👍 for PR implementation and 👎 for its complexity

@Ocramius
Copy link
Owner Author

So, 👍 for PR implementation and 👎 for its complexity

Fully agree on those thoughts, will think about it further before going on.

$proxyClassName = $this
->configuration
->getClassNameInflector()
->getProxyClassName($className, $proxyParameters);

if (! class_exists($proxyClassName)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line necessary? Wouldn't the fail-fast check above cover this? If we're at this point the proxy class is yet to be generated.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line triggers autoloading, which allows usage of an optimized classmap if proxies are generated on deployment to production

Ocramius added a commit that referenced this pull request Sep 28, 2014
Alternate hotfix for #108 - windows path length limitations
@Ocramius Ocramius merged commit f4e32b3 into master Sep 28, 2014
@Ocramius Ocramius deleted the hotfix/windows-sucks branch September 28, 2014 14:55
Ocramius added a commit that referenced this pull request Dec 12, 2014
Total issues resolved: **17**
- [108: Fix windows path length limitations](#108)
- [172: Alternate hotfix for #108 - windows path length limitations](#172)
- [178: Verify type-safety with `self` and `static` type-hints](#178)
- [180: #178 - `self` type safety check](#180)
- [181: Documentation should be released on github pages on the `gh-pages` branch.](#181)
- [182: Documentation on github pages](#182)
- [187: Proxy generation fails if magic methods are marked as final](#187)
- [189: Bugfix - cannot override final methods ( #187 )](#189)
- [190: [WIP] [EXPERIMENTAL] Codegen should not trigger fatals](#190)
- [191: Put link of documentation on README.md and Close #185](#191)
- [193: [WIP] Codegen errors](#193)
- [194: Code-generation fatal error prevention](#194)
- [195: Blogpost about 1.0.0, 2.0.0 and stability frames](#195)
- [196: Define maintainance time-frames (stable/oldstable/etc)](#196)
- [198: Highlighting the code examples](#198)
- [199: Removed unused `ReflectionMethod` import](#199)
- [202: #196 - adding document with expected stability time-frames](#202)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants