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

util.php -> vendor-tree? #1400

Closed
rarila opened this issue Jul 22, 2014 · 4 comments
Closed

util.php -> vendor-tree? #1400

rarila opened this issue Jul 22, 2014 · 4 comments

Comments

@rarila
Copy link
Contributor

rarila commented Jul 22, 2014

I just read the header of util.php and saw that this one is hosted on github and installable by composer. So I wonder if there's a reason that it's not put into the vendor tree?

@tobias2k
Copy link
Contributor

Off the top of my head, I think our version has diverged from the
original one, and the goal is to get rid of it entirely rather than
cement the dependency. I could be wrong though.

On Tue, Jul 22, 2014 at 01:06:35PM -0700, rarila wrote:

I just read the header of util.php and saw that this one is hosted on github and installable by composer. So I wonder if there's a reason that it's not put into the vendor tree?


Reply to this email directly or view it on GitHub:
#1400

Tobias Dammers - tobias@twokings.nl - 070-3457628 - www.twokings.nl
Maandag t/m donderdag van 9.00 tot 17.30
Voor dringende vragen, mail naar support@twokings.nl

@jadwigo
Copy link
Contributor

jadwigo commented Jul 23, 2014

please lets get rid of it - it would mean we have less documentation to maintain

@bobdenotter
Copy link
Member

I think only a few functions in util.php are used anyway. Let's check which those functions are, and move that handfull to our own lib.php, so we can get rid of it.

@bobdenotter
Copy link
Member

I've refactored out some dead code, unused calls, and replaced util.php with the variant that's stored in vendor. If anything, it's not directly our problem anymore. ^_^

If somebody feels like refactoring out the remaining functions, be my guest. I think this will do for now. ^_^

Remaining uses are in:

app/extensions/Authenticate/src/Controller.php:        $provider = \utilphp\util::get_var('provider', false);
app/extensions/RelatedContentByTags/extension.php:                $ids      = implode(' || ', \utilphp\util::array_pluck($queryResults, 'id'));
app/src/Bolt/Controllers/Async.php:                        'permissions' => \utilphp\util::full_permissions($fullfilename)
app/src/Bolt/Controllers/Backend.php:                        'permissions' => \utilphp\util::full_permissions($fullfilename)
app/src/Bolt/Stack.php:                'permissions' => \utilphp\util::full_permissions($fullpath)
app/src/Bolt/Storage.php:            $ids = implode(' || ', \utilphp\util::array_pluck($results, 'id'));
app/src/Bolt/Storage.php:            if (\utilphp\util::array_first_key($results)) {
app/src/Bolt/Storage.php:                return \utilphp\util::array_first($results);
app/src/Bolt/Storage.php:        $ids = \utilphp\util::array_pluck($content, 'id');
app/src/Bolt/Storage.php:        $contenttype = $content[\utilphp\util::array_first_key($content)]->contenttype['slug'];
app/src/Bolt/Storage.php:        $ids = \utilphp\util::array_pluck($content, 'id');
app/src/Bolt/Storage.php:        $contenttype = $content[\utilphp\util::array_first_key($content)]->contenttype['slug'];
app/src/Bolt/Storage.php:        $fulluri = \utilphp\util::str_to_bool($fulluri);
app/src/Bolt/TwigExtension.php:            $name = strtolower(\utilphp\util::array_first_key($menus));
app/src/Bolt/TwigExtension.php:            $menu = \utilphp\util::array_first($menus);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants