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

Add support for custom streams and paths #118

Merged
merged 18 commits into from Mar 12, 2014
Merged

Add support for custom streams and paths #118

merged 18 commits into from Mar 12, 2014

Conversation

@lisachenko
Copy link
Member

@lisachenko lisachenko commented Jan 23, 2014

This PR introduces support for different stream wrappers, such as http://, phar://, compress.zlib://, etc. This PR is experimental now because realpath() and stream_resolve_include_path() functions were replaced with custom resolver, need to add test cases before merging into master to verify, that everything is ok.

After merging of this PR it will be possible to use goaop for standalone console applications and tools that can be very interesting.

@lisachenko
Copy link
Member Author

@lisachenko lisachenko commented Jan 23, 2014

PR for #117

* Normalizes options for the kernel
* @param $options
*
* @return array|mixed

This comment has been minimized.

@cordoval

cordoval Jan 23, 2014
Contributor

is this not always an array? why mixed?

This comment has been minimized.

@lisachenko

lisachenko Jan 23, 2014
Author Member

Friendly phpStorm add this for me :) This should be only "array"

This comment has been minimized.

@cordoval

cordoval Jan 23, 2014
Contributor

maybe adjust it and plug your friendly theme as well http://github.com/cordoval/symfony2Colors

This comment has been minimized.

@lisachenko

lisachenko Jan 23, 2014
Author Member

done :)

@@ -186,6 +186,6 @@ public function isFresh($timestamp)
if (!$this->maxTimestamp && $this->resources) {
$this->maxTimestamp = max(array_map('filemtime', $this->resources));
}
return $this->maxTimestamp < $timestamp;

This comment has been minimized.

@cordoval

cordoval Jan 23, 2014
Contributor

leave a line break before the return

}

$bucket = stream_bucket_new($this->stream, $metadata->source);
stream_bucket_append($out, $bucket);
return PSFS_PASS_ON;

This comment has been minimized.

@cordoval

cordoval Jan 23, 2014
Contributor

would be more readable to leave a line before the return

This comment has been minimized.

@lisachenko

lisachenko Jan 23, 2014
Author Member

sounds good, need to clean the source code and make a single line before returns.

@@ -0,0 +1,53 @@
<?php
/**
* Go! OOP&AOP PHP framework

This comment has been minimized.

@cordoval

cordoval Jan 23, 2014
Contributor

I think you should change everything to AOP PHP Framework

This comment has been minimized.

@lisachenko

lisachenko Jan 23, 2014
Author Member

Created #119

lisachenko added 3 commits Jan 23, 2014
… code to have an ability to move source code into another path without changes, unix-style slashes instead of DIRECTORY_SEPARATOR
@lisachenko
Copy link
Member Author

@lisachenko lisachenko commented Jan 24, 2014

@cordoval you can try to play with https://github.com/lisachenko/gush/commit/64ad7d80eaf7b20f56097cb24233ae8c07b15530. It's initial configuration that simple prevent execution of gush itself :)

…ith relative including and include_path checking
lisachenko added 3 commits Mar 12, 2014
Conflicts:
	src/Go/Core/GoAspectContainer.php
	src/Go/Instrument/ClassLoading/SourceTransformingLoader.php
	src/Go/Instrument/Transformer/WeavingTransformer.php
lisachenko added a commit that referenced this pull request Mar 12, 2014
Add support for custom streams and paths
@lisachenko lisachenko merged commit 2ed1ec1 into master Mar 12, 2014
1 check was pending
1 check was pending
@lisachenko
default Scrutinizer: Running Analyses
Details
@lisachenko lisachenko deleted the feature/phar-support branch Mar 12, 2014
@matthiasnoback
Copy link

@matthiasnoback matthiasnoback commented Mar 13, 2014

@lisachenko Interesting work!

@lisachenko
Copy link
Member Author

@lisachenko lisachenko commented Mar 13, 2014

@matthiasnoback yes, it was very interesting to solve this outstanding task :) There was a lot of magic and it took all my knowledge about streams to implement this properly. Hope, that I didn't make an error somewhere...

Thank you for your interest to my work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants