Comments (18)
I will release a basic version for composer and one for laravel in the course of next week. Let you know when it's online :-)
from yakpro-po.
Hello,
Any news about the composer config?
Thanks
from yakpro-po.
Unfortunately, I can no longer find the configuration.
But I can show you how you can easily create it
With this function you can print out all used namespaces. Build the output so that an array with the absolute namespaces is created and copy them into the config at $conf->t_ignore_namespaces
.
public function getNamespaces()
{
$namespaces=array();
foreach(get_declared_classes() as $name) {
if(preg_match_all("@[^\\\]+(?=\\\)@iU", $name, $matches)) {
$matches = $matches[0];
$parent =&$namespaces;
while(count($matches)) {
$match = array_shift($matches);
if(!isset($parent[$match]) && count($matches))
$parent[$match] = array();
$parent =&$parent[$match];
}
}
}
print_r($namespaces);
}
Hope it helps you
from yakpro-po.
Same issue same answer:
I do not have time nor will to deal with any third party product...
If you are able to provide and maintain a generic yakpro-po.cnf file for composer, wordpress, ... or whatever other third party product, I will be very happy to provide a link to your repository...
from yakpro-po.
Can you explain to use t_keep
and t_skip
i've tried to put vendor / composer directory for avoid obfuscating but didn't work.
t_keep = ['./library/vendor']
If can't make it work with composer, i need to exclude it
Are they absolute or relative path?
from yakpro-po.
$conf->t_keep = ['./library/vendor'];
is ok... (if you have php >=5.4 ... otherwise use array('') syntax ) but I think that you will also have to populate $conf->t_ignore_classes , $conf->t_ignore_methods, ... and so on...
from yakpro-po.
@tom29 relative paths are relative to the current working directory (the directory on which you are ) when you run yakpro-po...
It works as I use it on my own big project I wrote the obfuscator for...
the relating extract of my yakpro-po.cnf is the following:
$conf->source_directory = '.';
$conf->target_directory = '..';
$conf->t_keep = array('config.php','local','memo','3rdparty/ckeditor');
$conf->t_skip = array('00_RELEASE_00','mppksag');
and my current working directory is the projects root directory when i run the yakpro-po command
from yakpro-po.
@pk-fr i just found the way to correct here.
the path needed to be 'library/vendor' instead of using absolute path.
if i ignored vendor folder, do i need to declare to ignore all classes, methodes, properties names ... of all classes inside the vendor path?
Because it's insane, there are numerous of them :(
from yakpro-po.
@tom29 you have to ignore all classes, methodes, properties names ...
that you use within your project....
from yakpro-po.
if you want to make a generic yakpro-po.cnf that will be usable to others, you will have to declare and maintain everything...
from yakpro-po.
@pk-fr yeah, i know. i'm making a cnf files thinking about writing some script which can get all the classes, methods, properties inside one folder.
or simply disable naming obfustation for all of them. Because some properties inside that folder can match with many other classes of mine.
from yakpro-po.
Hey, how's about t_ignore_pre_defined_classes
? If i put all the class name in vendor folder to it, will it work?
from yakpro-po.
by default:
$conf->t_ignore_pre_defined_classes = 'all';
you do not need to change it unless you want to obfuscate method names that are defined in a pre-defined class that you do not use...
from yakpro-po.
To use composer it is necessary not to change the namespace references, or to adapt each namespace consiquently.
I have a configuration for composer, but adapted to Laravel
from yakpro-po.
good news...
If you publish it on GitHub, I will provide a link to your repository.
from yakpro-po.
@Phil795 did this ever happen? ;)
from yakpro-po.
@Phil795 did this ever happen? ;)
I'm afraid not. Switched to another payment solution in the same week.
But I still have the config for Composer in a project.
If the Composer configuration is sufficient for you, I can send it to you
from yakpro-po.
That would be great, thanks!
from yakpro-po.
Related Issues (20)
- Error: Wrong version of PHP-Parser detected! HOT 1
- undefined function chgrp() HOT 2
- Modification date doesn't change HOT 1
- Option to obfuscate private methods, only
- [Question] Deobfuscation process HOT 2
- help
- No delete #[\ReturnTypeWillChange] of php 8.1 HOT 3
- Array equal Array HOT 1
- enum doesn't work
- A class named File will be not obfuscated HOT 1
- Feature request : replace t_ignore_*_prefix by t_ignore_*_regex
- Feature request: allow files with html + php HOT 1
- [Question] Is there a way to prevent obfuscating only selected string literals using a prefix HOT 3
- Decode - Clear All Goto Statement Video HOT 1
- Help to decode this code HOT 4
- [Question] Yak and A.I. ? HOT 7
- yakpro-po: command not found HOT 1
- Global variables HOT 1
- labels are not obfuscated HOT 2
- Include file to use constatnt HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yakpro-po.