Comments (4)
What version of mcrypt_compat are you using? From the most recent commit from the 1.0.14 release:
Lines 1253 to 1254 in e38b76f
That should prevent the deprecation warning.
For good measure I just tested it out. With #[\ReturnTypeWillChange]
I did not get the warning, without it I did.
from mcrypt_compat.
The latest version i see is 2.0.3 on Github, installing 2.0.3 shows the same error. When i add @return void
to the method, the error goes away, not sure what is the reason, i'm getting the deprecation message when running tests via phpunit
from mcrypt_compat.
Can you share the output of your php -i
?
What you're describing just doesn't jibe. So I created the following script:
<?php
class DemoFilter extends php_user_filter
{
#[\ReturnTypeWillChange]
public function filter($in, $out, &$consumed, $closing)
{
}
/**
* @return void
*/
public function onCreate()
{
}
public function onClose()
{
}
}
Here it's being ran on PHP 8.1: https://3v4l.org/kaChc
The output is as follows:
Deprecated: Return type of DemoFilter::onCreate() should either be compatible with php_user_filter::onCreate(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/kaChc on line 13
Deprecated: Return type of DemoFilter::onClose() should either be compatible with php_user_filter::onClose(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/kaChc on line 17
ie. the only line that doesn't result in a Deprecated warning is the one that's doing #[\ReturnTypeWillChange]
. I'm guessing on yours it'd be the one that's doing @return void
?
I mean, I can do @return void
but I want to better understand the problem, first. Like what if this is an Ubuntu modified PHP version? In that scenario a bug report against the Ubuntu package maintainer might be appropriate in addition to doing @return void
.
from mcrypt_compat.
Thanks, I tried this in an isolated project and there is no deprecation for #[ReturnTypeWillChange]
attribute while there is one for annotation.
from mcrypt_compat.
Related Issues (20)
- RIJNDAEL-128 ECB Mode doesn't use IV but this polyfill requires a 16-bit IV HOT 3
- create_function deprecated in PHP 7.2 HOT 6
- Enhance project description HOT 1
- Serpent Support HOT 1
- stream_filter_append output is different than original mcrypt when writing HOT 4
- phpseclib_mcrypt_module_open CFB mapping missing from 1.0 branch HOT 2
- test-related questions, understand whether you need to change the test in the testMcryptGenericMode HOT 1
- Fatal Error in Version 1.07 HOT 2
- Module initialization failed... PHP7.2.1
- Buffer bug in filter function HOT 5
- RC2 max key size incompatibility
- Uncaught Error: Class 'phpseclib3\Crypt\Blowfish' not found in lib/mcryptcompat/mcrypt.php:307 HOT 2
- THANKYOU!!!!!! HOT 1
- php 8.1 compatibility issues HOT 4
- OFB mode - Uncaught TypeError: Argument 1 passed to mcrypt_enc_get_iv_size() must be an instance of phpseclib3\Crypt\Common\SymmetricKey, bool given HOT 9
- PHP 8.1 deprecation warnings HOT 4
- Thank you thank you thank you
- Dependency on phpseclib/phpseclib:dev-master? HOT 5
- Can we also have old PHP behavior? HOT 11
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 mcrypt_compat.