text:
UX Suggestion: Update Risk Analysis chart colors

Great work with the Risk analysis component on L2Beat. It's very insightful!
While the colors yellow/red are good for warning, as a small enhancement, it'd be amazing to see the good/ok parts for all L2s green instead of grey. That would give a much better sense of approval to the audience as green is widely associated to be a happy indicator.

wip #1631

authors: dewanshparashar lucadonnoh


text:
add keep_cookies to serialized aim fields

Fix current bug.
Serialize aim config via:
epv_env = aiobastion.EPV(serialized=config)
keep_cookies not found as valid key.
 File "/home/[...]/lib64/python3.11/site-packages/aiobastion/aim.py", line 57, in __init__     raise AiobastionException(f"Unknown serialized AIM field: {k} = {v!r}") aiobastion.exceptions.AiobastionException: Unknown serialized AIM field: keep_cookies = False

Thanks for fixing that bug

source: gharchive/pull-request

authors: gleveille-lbp jpieperro

repo: labanquepostale/aiobastion

license: MIT

license_type: permissive

license_source: github-api


text:
add property to configure rate limit

We are using this provider to try populating a new Stack with ~35 global fields and content types.
When we run terraform plan and the provider tries to refresh state or apply we are running into many 429 (too many request) responses from the ContentStack Management API.
We would like a method to tune the number of API requests per second to match our ContentStack API Rate Limit and avoid going over.

Hi @david-alpert-nl thanks for reaching out!
This would indeed be useful. We could probably implement a rate limiter on the RoundTripper by adding something like https://pkg.go.dev/golang.org/x/time/rate to this.
I will put this on the backlog to look into, but due to priorities it might take a while. Feel free to send me a PR to add this if you need it quickly!

source: gharchive/issue

authors: david-alpert-nl demeyerthom

repo: labd/terraform-provider-contentstack


text:
[bug] Newly built cloud storage space cannot set the capacity

Search before asking

[X] I had searched in the issues and found no similar issues.

Environment
laf.dev
What happened

How to reproduce
Newly built cloud storage space cannot set the capacity
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

All buckets use the same storage space, no longer distinguish the capacity of each bucket

Then calculate their total capacity?

authors: LeezQ nightwhite

repo: labring/laf


text:
Refactors wording in some Mixer Doxygen comments to read better.

Also fixes errors relating to colons.

@DanRStevens Apparently pushing to a merged PR doesn't do anything, so here's a new one to address the errors generated.

Adding references: #923, #899, #861

authors: DanRStevens cugone

license: Zlib


text:
Add neq instruction

Add neq instruction in the same module as eq
Refactor and add tests

Codecov Report

Merging #12 (722ff25) into main (21aa2f5) will increase coverage by 0.03%.
The diff coverage is 100.00%.

:exclamation: Current head 722ff25 differs from pull request most recent head 9caddea. Consider uploading reports for the commit 9caddea to get more accurate results

@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
+ Coverage   86.70%   86.73%   +0.03%
==========================================
  Files          27       27
  Lines        7974     7993      +19
==========================================
+ Hits         6914     6933      +19
  Misses       1060     1060

Impacted Files
Coverage Δ

src/helpers.rs
69.95% <100.00%> (+0.06%)
:arrow_up:

src/instructions/is_eq.rs
100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

authors: codecov-commenter igamigo


text:
Remove use of usize from the VM core struct

Problem
The VM execution should be deterministic regardless of if it is executed on a 16, 32 or 64 bit processor.
Having usize being used in order to define some of the core VM types (segment offset, ap, fp) is problematic because it could lead to different execution on different machines. Which, in a decentralized blockchain architecture will lead to hard forks.
Recomandation

Get rid of all the usize in the cairo-vm stuct. I think it's still okay to use usize when we call language method like len() but we should convert those as soon as possible to types that have a fixed behaviour regardless of the machine.

Ban the use of as. as silence the value overflows. This is not something we want at all in a blockchain context. We should use the very explicit try_from/into instead and handle errors accordingly.

Impl
I would reccomand we introduce a new wrapper struct: SegmentOffset(u64) that will be used instead of usize in all Relocatable, ap and fp. This will require impl a lot of conversion methods on it, but it will give us the level of security we need for such a core component of our infrastructure.

I would reccomand we introduce a new wrapper struct: SegmentOffset(u64) that will be used instead of usize in all Relocatable, ap and fp. This will require impl a lot of conversion methods on it, but it will give us the level of security we need for such a core component of our infrastructure.

I don't really understand this part. Why not just make the offset u64? If it's just to avoid as, maybe there's a clippy lint for that?

Re: execution on different architectures: AFAICT, in the cases we could observe overflows in the offsets execution would fail due to exceeding the addressable space anyway, so usize should work well for any program that can in fact run correctly in smaller architectures. Not that it wouldn't be more correct to use explicit sizes anyway (I also have a more compact u64 representation for Relocatable in mind for traces).

Why not just make the offset u64?

It would work, but next time you want to change, lets say to u32, it will be hell again. With the correct encapsulation it is easier to change in the future.

execution on different architectures: AFAICT, in the cases we could observe overflows in the offsets execution would fail due to exceeding the addressable space anyway, so usize should work well for any program that can in fact run correctly in smaller architectures.

I think you are correct on this one. But it mean that it work "by luck" and it will be okay until it isn't. So yes I would prefer the more restrictive architecture.
Also some traits like parity-scale-codec::{Encode, Decode} are not implemented on usize. So getting rid of it would be more handy..

Same goes with isize used as segment_index in Relocatable

Sounds reasonable.

@Oppen @igaray 👋

Hello!
I understand the need to have deterministic execution which doesn't change between different architectures but I don't think changing the type of the address' offsets to u64 will fully solve this.
The memory structure of the VM is made up of vectors that each represent a memory segment, the maximum capacity of a memory segment is given by usize::MAX, therefore depending on the architecture on which the VM is run. Even if addresses are changed to represent offsets up to u64::MAX, the memory they address is still constrained to usize::MAX. A program which fails to run on a 32bit architecture due to exceeding the addressable memory will still fail after this change and it will still run correctly on a 64bit architecture

the maximum capacity of a memory segment is given by usize::MAX

Yeah that sound like a bad design. It should be a u64 or a u128 or whatever. But it should be defined by the starknet spec, not by the machine the program runs on. Otherwise the virtual machine is not that virtual, it end up being tied up to the actual hardware.
When are you planning to solve all of this @fmoletta? As I say, it could be great to have it before 1.0.0 release

the maximum capacity of a memory segment is given by usize::MAX

Yeah that sound like a bad design. It should be a u64 or a u128 or whatever. But it should be defined by the starknet spec, not by the machine the program runs on. Otherwise the virtual machine is not that virtual, it end up being tied up to the actual hardware.
When are you planning to solve all of this @fmoletta? As I say, it could be great to have it before 1.0.0 release

What I meant by that line is that the maximum capacity of a vector in rust is usize::MAX, therefore the maximum capacity for a memory segment  is usize::MAX. It's not something we can change without changing the whole structure of the memory

Well, that is a bad design. The max size of a segment should be decided by the VM specs. Not by some implementation details which makes it depend on the hardware it is running on.
Once you decide that the max size of a segment is x (maybe 2^251-1, or something else), you implement it in a way that makes it respect the the specs, regardless of the hardware. Not the other way around.

Regardless, this is a very specific edge case that most likely will never happen in an actual run.
Removing size from everywhere else is still something relevant

authors: Oppen fmoletta tdelabro

repo: lambdaclass/cairo-vm


text:
Fix log tests

This PR fixes log0 to log4 tests

Not part of this PR, but related, there are two other places in our codebase where get_forward_memory_pointer  is called
https://github.com/lambdaclass/era_vm/blob/323a83b902373c24becf335e500b1b0a80e677f2/src/op_handlers/ok.rs#L29-L30
https://github.com/lambdaclass/era_vm/blob/323a83b902373c24becf335e500b1b0a80e677f2/src/op_handlers/ok.rs#L40-L41
In this case and neither any of those other cases the None case is handled, it might be better to just propagate the error the function might throw.
Change:
pub fn get_forward_memory_pointer(
    source: U256,
    vm: &mut VMState,
    is_pointer: bool,
) -> Result<Option<FatPointer>, EraVmError>

To:
pub fn get_forward_memory_pointer(
    source: U256,
    vm: &mut VMState,
    is_pointer: bool,
) -> Result<FatPointer, EraVmError>


text:
Entry point validation / class hash issue

Given this class starknet_in_rust code either fails validation or class hash computation, depending on which way I try to parse the contract class.
Steps to reproduce:
curl -s https://alpha-mainnet.starknet.io/feeder_gateway/get_class_by_hash\?classHash\=0x04479c3b883b34f1eafa5065418225d78a11ee7957c371e1b285e4b77afc6dad > starknet_programs/raw_contract_classes/0x4479c3b883b34f1eafa5065418225d78a11ee7957c371e1b285e4b77afc6dad.json

Two of these three test cases fail:
    #[test]
    fn test_compute_class_hash_0x4479c3b883b34f1eafa5065418225d78a11ee7957c371e1b285e4b77afc6dad_try_from(
    ) {
        let contract_str = fs::read_to_string("starknet_programs/raw_contract_classes/0x4479c3b883b34f1eafa5065418225d78a11ee7957c371e1b285e4b77afc6dad.json").unwrap();

        let contract_class =
            ContractClass::try_from(<String as AsRef<str>>::as_ref(&contract_str)).unwrap();

        assert_eq!(
            compute_deprecated_class_hash(&contract_class).unwrap(),
            felt_str!(
                "4479c3b883b34f1eafa5065418225d78a11ee7957c371e1b285e4b77afc6dad",
                16
            )
        );
    }

    #[test]
    fn test_compute_class_hash_0x4479c3b883b34f1eafa5065418225d78a11ee7957c371e1b285e4b77afc6dad_new(
    ) {
        let contract_str = fs::read_to_string("starknet_programs/raw_contract_classes/0x4479c3b883b34f1eafa5065418225d78a11ee7957c371e1b285e4b77afc6dad.json").unwrap();

        let parsed_contract_class = ParsedContractClass::try_from(contract_str.as_str()).unwrap();
        let contract_class = ContractClass::new(
            serde_json::Value::from_str(&contract_str).unwrap(),
            parsed_contract_class.program,
            parsed_contract_class.entry_points_by_type,
            parsed_contract_class.abi,
        )
        .unwrap();

        assert_eq!(
            compute_deprecated_class_hash(&contract_class).unwrap(),
            felt_str!(
                "4479c3b883b34f1eafa5065418225d78a11ee7957c371e1b285e4b77afc6dad",
                16
            )
        );
    }
    #[test]
    fn test_compute_class_hash_0x4479c3b883b34f1eafa5065418225d78a11ee7957c371e1b285e4b77afc6dad() {
        let contract_str = fs::read_to_string("starknet_programs/raw_contract_classes/0x4479c3b883b34f1eafa5065418225d78a11ee7957c371e1b285e4b77afc6dad.json").unwrap();

        let parsed_contract_class = ParsedContractClass::try_from(contract_str.as_str()).unwrap();
        let contract_class = ContractClass {
            program_json: serde_json::Value::from_str(&contract_str).unwrap(),
            program: parsed_contract_class.program,
            entry_points_by_type: parsed_contract_class.entry_points_by_type,
            abi: parsed_contract_class.abi,
        };

        assert_eq!(
            compute_deprecated_class_hash(&contract_class).unwrap(),
            felt_str!(
                "4479c3b883b34f1eafa5065418225d78a11ee7957c371e1b285e4b77afc6dad",
                16
            )
        );
    }

ContractClass::try_from(&str) does not fail but leads to an invalid class hash.
ContractClass::new() fails because the entry points in this class are not ordered properly.
When constructing ContractClass directly (not possible via the public API) the computed class hash is OK though...
And why are there multiple APIs for parsing a class definition? I'd much prefer something like ContractClass::try_from(&str) that actually works rather than having to use ParsedContractClass (I don't even know what that is and what relation it has with ContractClass).

The issue was fixed in #764 😄

authors: MegaRedHand kkovaacs


text:
How do i add it to an ionic3 app?

I used the cmd in readme.md but it works wrong while building.

follow the readme on installing the pluginand add:
declare var startApp: any;
to the page that will use the plugin, under your imports.

authors: JamesLiuft jrarcher

license: mit

license_source: bigquery


text:
Steamcache not working with IPv6 on

Issue Description:
I installed steamcache-dns and steamcache/generic and everthing works fine, but only if i turn ipv6 off.
If i have ipv6 on it always walks that way and ignores my ipv4 dns and steam cache...
Is ipv6 support still missing or am i just too stupid to get it working right?
Docker Run Command:
sudo docker run --name steamcache-dns -p 192.168.178.150:53:53/udp -e STEAMCACHE_IP=192.168.178.150 -e BLIZZARDCACHE_IP=192.168.178.151 -e UPSTREAM_DNS=8.8.8.8  steamcache/steamcache-dns:latest

Currently ipv6 is largely untested within the cache images. The steamcache-dns is intended as a simple solution to the dns interception and will NOT be supporting ipv6 anytime soon. If you want to use ipv6 you would need to implement your own dns solution for the time being i'm afraid

I just bumped into this as well. If it's still a wontfix, it would be helpful if there was a message in the README to disable IPv6 or at least DNS over IPv6.
If you have a network assigning IPv6 address and follow the readme, you only see traffic going to your cache sporadically. e.g. https://github.com/uklans/cache-domains/issues/109

Although I don't imagine we'll have full IPv6 support soon (i.e. content being downloaded via IPv6 addresses) and therefore not supporting IPv6 only networks (yet) ...
I fully expect it to work fine if you expose the lancache-dns image on an IPv6 address and set it as your DNS server in your IPv6 settings (the same as you have to do with your IPv4 settings).

I fully expect it to work fine if you expose the lancache-dns image on an IPv6 address and set it as your DNS server in your IPv6 settings (the same as you have to do with your IPv4 settings).

I can confirm, IPv6 DNS lookup resolves down to the IPv4 served by Monolithic or whatever cache you are using. However, IPv6 support in docker is something I haven't looked into in a while, but it's not likely user friendly. The easiest solution is to simply disable IPv6 DNS, which shouldn't cause any issues since a IPv4 DNS server will respond with IPv6 addresses so your network will still work as intended.

authors: Candunc VibroAxe astrolox teknoman117 tiramon

repo: lancachenet/lancache-dns


text:
Add function to delete dataset versions

Right now we keep all versions of a dataset, but to save disk space, we'd like to remove older versions.
The API might allow removing a specific version or all versions before one.
dataset.delete_versions(1)
dataset.delete_versions(1, 3, 4)
dataset.delete_versions(before=7)

To perform this operation, we first need to crawl the metadata for files present in existing versions. This includes both data files, deletion files, and index files.
Then for each version to be deleted, determine which files aren't part of the existing file set. Delete those objects and the corresponding manifest file. Use ObjectStore::delete_stream() for maximum efficiency.
For operations like this, we'd like to provide the option for the user to distribute the operation. So there could be a single node implementation (configurable to use one or multiple threads) and a multi-node implementation, which returns a vector of tasks. See implementation of file compaction for inspiration: https://github.com/lancedb/lance/pull/1095

Semantic-wise,  how is this different to a VACUUM operation?

We could also call it vacuum.
This is designed differently than Delta Lake in the sense that it won't keep around versions referencing deleted files. Right now Delta Lake deleted data files in older versions, but has a separate deletion process for the log files. So it's possible to attempt to load an old version of a table and it will return not found for the data files. IMO that's a suboptimal user experience, so I wanted to make sure our API deletes the manifest along with the orphaned data files at the same time. And I think an API that says delete_versions() more clearly states that you are deleting old versions of tables.
What do you think?

We could also have an api like:
dataset.delete_versions(older_than=timedelta(days=7))

Which might be a more common calling pattern.

@westonpace should this be considered closed now that we have a ticket for Python?

Yes, I think so.

Hi, I'd like to understand how this functionality is exposed to LanceDB? I'm adding data to a LanceDB table via tbl.add(data, mode='append') and it's not clear from the add method's code that the older versions of the manifests are cleaned up this way.
Could you please clarify if deleting old versions beyond a certain threshold is possible in LanceDB at present?

repo: lancedb/lance


text:
Return ok with failed tests

It looks like it returns OK even if I get failed test on verification. Can I make it return error on verification failure.
it "should allow casino10-qa.test.example.com" {
  source anon-hostheader_class.tcl

  on IP::client_addr return "1.2.3.4"
  on HTTP::host return "casino10-qa.test.example.com"
  on HTTP::uri return "/init"
  verify "service-gateway-qa-gateway-anon.ocptest.example.com" "service-gateway-qa-ERROR-anon.ocptest.example.com" == {HTTP::header Host}
  endstate pool ocp_dev_infranodes_443
  run test_suppliers.irule test.suppliers-irule
}

And results
 **************************************************************************
* it should allow casino10-qa.test.example.com
**************************************************************************
-> Test failure!!
-> -> Verification 'service-gateway-qa-gateway-anon.ocptest.example.com' failed - expression: {service-gateway-qa-ERROR-anon.ocptest.example.com} == {service-gateway-qa-gateway-anon.ocptest.example.com}
error     Verification 'service-gateway-qa-gateway-anon.ocptest.example.com' failed - expression: {service-gateway-qa-ERROR-anon.ocptest.example.com} == {service-gateway-qa-gateway-anon.ocptest.example.com}
(venv) [olanys@netman02 test-f5-config]$ echo $?
0

As you can see we get 0 (ok) as returncode, and so the test-suite says everything is OK.

Try calling “stats” command at the very end of your test file

okt. 2019 kl. 11:29 skrev olanystrom notifications@github.com:

It looks like it returns OK even if I get failed test on verification. Can I make it return error on verification failure.
it "should allow casino10-qa.test.example.com" {
source anon-hostheader_class.tcl
on IP::client_addr return "1.2.3.4"
on HTTP::host return "casino10-qa.test.suppliers.atg.se"
on HTTP::uri return "/init"
verify "service-gateway-qa-gateway-anon.ocptest.example.com" "service-gateway-qa-ERROR-anon.ocptest.example.com" == {HTTP::header Host}
endstate pool ocp_dev_infranodes_443
run test_suppliers.irule test.suppliers-irule
}
And results

it should allow casino10-qa.test.example.com

-> Test failure!!
-> -> Verification 'service-gateway-qa-gateway-anon.ocptest.example.com' failed - expression: {service-gateway-qa-ERROR-anon.ocptest.example.com} == {service-gateway-qa-gateway-anon.ocptest.example.com}
error     Verification 'service-gateway-qa-gateway-anon.ocptest.example.com' failed - expression: {service-gateway-qa-ERROR-anon.ocptest.example.com} == {service-gateway-qa-gateway-anon.ocptest.example.com}
(venv) [olanys@netman02 test-f5-config]$ echo $?
0
As you can see we get 0 (ok) as returncode, and so the test-suite says everything is OK.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

That works perfectly. I missed the stats in the examplefile.

authors: landro olanystrom

repo: landro/TesTcl


text:
🛑 rexingsports.cn is down

In 5c1b476, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 760 ms

Resolved: rexingsports.cn is back up in eca0f65 after 17 minutes.

repo: lanen/bs-site


text:
🛑 rexingsports.cn is down

In 38d83a7, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 604 ms

Resolved: rexingsports.cn is back up in b8bd06a after 24 minutes.


text:
🛑 rexingsports.cn is down

In 0f3ba56, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 872 ms

Resolved: rexingsports.cn is back up in 1a4063f after 21 minutes.


text:
🛑 vipgifts.net is down

In 6539e5c, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 672 ms

Resolved: vipgifts.net is back up in 21d5633 after 18 minutes.


text:
🛑 rexingsports.cn is down

In 0a3e9a4, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 601 ms

Resolved: rexingsports.cn is back up in ac2475c after 27 minutes.


text:
🛑 vipgifts.net is down

In d5b4629, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 751 ms

Resolved: vipgifts.net is back up in 32a89d4 after 21 minutes.


text:
Handle dyphonemic sounds

нотатки з дискусії:

з сторінки де алгоритм записаний
Дифонемні послідовності приголосних, що передають один звук, повинні бути записані з другим додатковим елементом: дж → джж: віджи́лій → віджжи́лий дз → ДЗЗ: підзе́мний → підззе́мній
слова:
надзвичайний, підживляти, спортзал

@mariana-scorp maybe?

authors: dchaplinsky robinhad

repo: lang-uk/ipa-uk


text:
partners/astradb: bootstrapping Astra DB as Partner Package

Description: This PR introduces a new "Astra DB" Partner Package.
So far only the vector store class is duplicated there, all others following once this is validated and established.
Along with the move to separate package, incidentally, the class name will change AstraDB => AstraDBVectorStore.
The strategy has been to duplicate the module (with prospected removal from community at LangChain 0.2). Until then, the code will be kept in sync with minimal, known differences (there is a makefile target to automate drift control. Out of convenience with this check, the community package has a class AstraDBVectorStore aliased to AstraDB at the end of the module).
With this PR several bugfixes and improvement come to the vector store, as well as a reshuffling of the doc pages/notebooks (Astra and Cassandra) to align with the move to a separate package.
Dependencies: A brand new pyproject.toml in the new package, no changes otherwise.
Twitter handle: @rsprrs

It would be convenient to have an astradb package extra that would pull langchain-astradb. But that can be done in future work.

Awesome 😃 ! Can't wait to see the first package on Pypi !

authors: cbornet hemidactylus

repo: langchain-ai/langchain


text:
Name clashing of terminal and non-terminal rules

Langium version: 0.2.1
Steps To Reproduce
Generate an AST by a grammar that contains the same word as a keyword and a rule name. For example, here the word Function gives name clashing.
Function:
	GlobalFunction | LocalizedText | Validator | ParameterList;

FunctionTypeReference:
	'Function' ParameterList ('to' returnType=TypeReference)?;

The current behavior
Rises an error: The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <Function>.
The expected behavior
No errors. As a possible solution, support ^ like it's made for the keywords and property names clashing, so we have a keyword 'Function' and a ^Function rule.

Due to #372 another solution has to be presented.

I propose to rename keyword tokens instead of grammar rules. I think that will be easier to understand for users.
Example: for a 'Function' keyword, name the token KW:Function.

authors: Pluralia spoenemann

repo: langium/langium


text:
Suggestion Recolor sliders to show on or off state.

Select your issue type: (check at least one)

[ ] Bug
[ ] Question
[x] Suggestion
[ ] Other (please describe):

Describe your issue:
Currently the checkboxes are somewhat confusing on the dashboard page.
You also can only click on the circle.
Video clip of before/after css fix: https://streamable.com/0wp7l
Attached a css fix you can apply to an inspector stylesheet. Mind you it's a bit hacky as I needed it to hide some of the original css.
.settings-checkbox{
    position: relative;
    width: 55px;
    -webkit-user-select:none;
    -moz-user-select:none;
    -ms-user-select: none;
    background-color: unset;
}
.settings-checkbox input[type=checkbox]{
    display: none;
    visibility: visible;
}
.settings-checkbox label{
    display: block;
    overflow: hidden;
    cursor: pointer;
    height: 20px;
    padding: 0;
    line-height: 20px;
    border: 2px solid white;
    border-radius: 20px;
    background-color: darkgrey !important;
    transition: background-color 0.3s ease-in;
}
.settings-checkbox label:before{
    content: "";
    display: block; width: 20px; margin: 0px;
    background: white;
    box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.37);
    position: absolute; top: 0; bottom: 0;
    right: 33px;
    border: 2px solid white; border-radius: 20px;
    transition: all 0.3s ease-in 0s;
    width: 26px;
    height: 26px;
}
.settings-checkbox input[type=checkbox]:checked + label{
    background-color: deepskyblue !important;
}
.settings-checkbox input[type=checkbox]:checked + label, .settings-checkbox input[type=checkbox]:checked + label:before{
   border-color: deepskyblue;
   box-shadow: unset;
}
.settings-checkbox input[type=checkbox]:checked + label:before{
    right: 0px;
}
.settings-checkbox label{
    width: 50px;
    height: 26px;
    position: initial;
}

Hi @Psyda . Thanks for the css. May I ask which version were you on? The blue on/ black off switches were implemented in this PR https://github.com/lap00zza/9anime-Companion/pull/47 2 weeks back and the changes are already live. Can you please try one of the builds from Appveyor or from Chrome Web Store or Mozilla AMO

~Ah, I didn't get the update. Sorry about that.~
You guys work fast! That took 2 minutes.


text:
Terminal failed to launch. Error: Failed to spawn command '/bin/bash': Not a directory (os error 20)

Lapce Version
4
The Lapce version you are using, which can be found in "About Lapce" at the top right settings icon.
cc by 4.0
System information
linux astra x86
the operating system used, including its version, e.g. Windows 10, Ubuntu 18.04
Describe the bug
Some time receive this message:
Terminal failed to launch. Error: Failed to spawn command '/bin/bash': Not a directory (os error 20)
Additional information
Other information that can be used to further reproduce or isolate the problem.
This commonly includes:

screenshots
logs
theories about what might be going wrong
workarounds that you used

#Lapce Version
4
The Lapce version you are using, which can be found in "About Lapce" at the top right settings icon.
cc by 4.0
System information
Ubuntu 20.04
Describe the bug
All the time receive this message:
Terminal failed to launch. Error: Failed to spawn command '/bin/bash': Not a directory (os error 20)
Additional information
Other information that can be used to further reproduce or isolate the problem.
This commonly includes:
built the project and opened first time, everything worked. Closed and opened once more and after that I always get this issue no matter what I do (PC turning off doesn't help either)

authors: YuriyGavrilov funkvay-star

repo: lapce/lapce


text:
ssh entry field (standard) keyboard shortcuts don't work

Windows (with https://github.com/lapce/lapce/releases/tag/v0.0.12 portable version), when clicking on ssh button and then typing in host details, the standard Windows/GUI editing key-combos do not work:

CTRL-a - does not select any text
CTRL-insert (copy/paste) does not work
CTRL-V (copy/paste) does not work
cursorkeys does not navigate
SHIFT-cursorkeys does not select
mouse can not move cursor around

This should be fixed now by the latest v0.1.0 release.

Fixed


text:
Improve Ctrl+Left-Arrow Keys behavior

As mentioned in the issue #1529, the Ctrl+Arrow keys behave slightly incorrectly, especially with regard to indentation where Ctrl+Left moves the cursor to the top line when it should move the cursor to the beginning of the line and the next time it should move to the top line
I don't know now but it looks like CHANGEMOD.md has been automated so I don't know if I should add an entry.

I don't know now but it looks like CHANGEMOD.md has been automated

It's not

so I don't know if I should add an entry.

You should

Codecov Report

Merging #1531 (492360a) into master (bd17c63) will increase coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##           master   #1531      +/-   ##
=========================================
+ Coverage    6.61%   6.68%   +0.07%
=========================================
  Files         125     125
  Lines       51487   51171     -316
=========================================
+ Hits         3406    3421      +15
+ Misses      48081   47750     -331

Impacted Files
Coverage Δ

lapce-core/src/word.rs
92.49% <100.00%> (+0.57%)
:arrow_up:

lapce-ui/src/app.rs
0.00% <0.00%> (ø)

lapce-ui/src/title.rs
0.00% <0.00%> (ø)

lapce-ui/src/window.rs
0.00% <0.00%> (ø)

lapce-data/src/proxy.rs
0.00% <0.00%> (ø)

lapce-data/src/editor.rs
0.00% <0.00%> (ø)

lapce-data/src/update.rs
0.00% <0.00%> (ø)

lapce-proxy/src/terminal.rs
0.00% <0.00%> (ø)

lapce-proxy/src/plugin/lsp.rs
0.00% <0.00%> (ø)

... and 1 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

authors: codecov-commenter killianc3 panekj


text:
🛑 Perso Website 2 is down

In 2391c98, Perso Website 2 (https://www.famillelapierre.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Perso Website 2 is back up in d88e2de.


text:
make:controller does not generate resourceful controller

Laravel 5.2 generates empty controller using 'interactive make'. However using 'php artisan make:controller TestController --resource' artisan generates resourceful controller.

Hi @doobas
This has been fixed in version 0.8 . You can grab it through composer.
Thank you

authors: doobas tutelagesystems

repo: laracademy/interactive-make


text:
elastic up fail

Info:

Docker version Docker version 19.03.2, build 6a30dfc:
System info linux-ubuntu:
System info 18.4:

Issue:
use elasticsearch 6.8.3
after docker-compose up -d elasticsearch
elasticsearch exited with code 1 after 20 second
Relevant Code:
// place a code sample here
elasticsearch:
build: ./elasticsearch
volumes:
- elasticsearch:/usr/share/elasticsearch/data
environment:
- discovery.type=single-node
- cluster.name=laradock-cluster
- node.name=laradock-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
- cluster.initial_master_nodes=laradock-node
ulimits:
memlock:
soft: -1
hard: -1
ports:
- "${ELASTICSEARCH_HOST_HTTP_PORT}:9200"
- "${ELASTICSEARCH_HOST_TRANSPORT_PORT}:9300"
depends_on:
- php-fpm
networks:
- frontend
- backend

I have the same problem. Unfortunately

Deleting the environment variable "cluster.initial_master_nodes" solved the problem in my case.

I have the same problem. Unfortunately.
EDIT:
Deleting the environment variable "cluster.initial_master_nodes" solved the problem in my case.

tnx work for me

authors: dziurka mohammadkshn

repo: laradock/laradock


text:
Call to undefined method Encore\Chartjs\Chartjs::boot()

我也遇到这个问题了，怀疑是laravel-admin 版本的问题吧。我的版本是：1.5.15
之前用 1.5.7 安装就没出现这个问题。
你解决了这个问题了吗？

同问如何解决

有人知道怎么解决？

已经解决，需要更新laravel-admin 版本

repo: laravel-admin-extensions/chartjs


text:
Searchable select in repeater

Package
filament/filament
Package Version
v2.5.24
Laravel Version
v8.76.1
Livewire Version
v2.8.2
PHP Version
PHP 8.0.13
Bug description
When we use the searchable() option for select in the repeater we get an error in the console when deleting.

Steps to reproduce
Forms\Components\Repeater::make('users')->schema([
    Forms\Components\Select::make('user_id')
        ->label('Model')
        ->options(User::query()->get()->pluck('name', 'id')->toArray())
        ->searchable()
        ->required()
])

Relevant log output
SupportAlpine.js:53 Uncaught (in promise) TypeError: Cannot read properties of null (reading '__livewire')
    at SupportAlpine.js:53
    at Object.get (module.esm.js:1631)
    at Object.get (module.esm.js:1544)
    at getOptionLabelUsing (eval at <anonymous> (module.esm.js:1697), <anonymous>:5:21)
    at module.esm.js:19152
    at c (runtime.js:63)
    at Generator._invoke (runtime.js:294)
    at Generator.next (runtime.js:119)
    at Fu (app.js?id=c5560e02fb2bba583435:8)
    at a (app.js?id=c5560e02fb2bba583435:8)SupportAlpine.js:53 Uncaught (in promise) TypeError: Cannot read properties of null (reading '__livewire')
    at SupportAlpine.js:53
    at Object.get (module.esm.js:1631)
    at Object.get (module.esm.js:1544)
    at getOptionLabelUsing (eval at <anonymous> (module.esm.js:1697), <anonymous>:5:21)
    at module.esm.js:19152
    at c (runtime.js:63)
    at Generator._invoke (runtime.js:294)
    at Generator.next (runtime.js:119)
    at Fu (app.js?id=c5560e02fb2bba583435:8)
    at a (app.js?id=c5560e02fb2bba583435:8)

Hey, thanks for the issue. I've investigated it and I'm pretty sure that this is in a bug within Livewire and not Filament:

The error doesn't make sense - Alpine is unable to find the Livewire component, even though the Livewire component is never destroyed - only an Alpine component (when the repeater item is deleted).
Everywhere I've used $wire. on the select component, I've replaced with $wire?., which makes it nullsafe. The error is not gone. This is further confirmation that the null is not an object probably isn't anything to do with Filament.

Thankfully it doesn't affect the functionality of the repeater at all (as far as I know).
I may be wrong - if I am and you find a fix for this within Filament, please submit a PR.

authors: danharrin lolen

repo: laravel-filament/filament


text:
Refactor PageActions

As discussed with Dan on Discord this is a first POC how we could refactor the page actions into separate classes while keeping them compatible with V2.
This could clean up Page classes a lot and also make Actions easier to modify globally by using Laravel's container, e.g.:
$this->app->bind(
    \Filament\Pages\Actions\DeleteAction::class,
    \App\Filament\Actions\DeleteAction::class,
);

Page actions could then be defined and modified like this:

protected function getActions(): array
{
    return [
        DeleteAction::make('delete')->color('primary'),
        EditAction::make('edit')->color('danger'),
    ];
}

Gonna merge this into #2644

authors: danharrin pxlrbt


text:
Incorrect mapping of faker data

Some of the commonly named columns did not map to the correct types. For example, email got mapped to word
In addition, it'd be nice if anything _id was mapped to an integer (or null) if it were not determined to be a model.
Example:

@Naoray for some reason I can't assign you. But here's that issue we discussed.

repo: laravel-shift/factory-generator


text:
Eloquent WhereIn working incorrect when models collection is bypassed.

Laravel Version: 5.3.26
PHP Version: 7.0.7
Database Driver & Version: MySQL Ver 14.14 Distrib 5.6.28

Description:
When trying to bypass not pluck('id') of collection, but get() to whereIn method - query seems to be broken and no errors are thrown.
Steps To Reproduce:
$statuses = Status::whereIn('name', [
    'draft',
    'pending_approval',
    'awaiting_payment',
    'paid',
    'paid_part',
    'another_status',
])->get();

$payments = Payment::whereIn('status_id', $statuses)->get();

This code generates query:
select *
  from `payments`
 where `status_id` in ('3', 'awaiting_payment', '1', 'draft', '5', 'another_status');

Expected output:
select *
  from `payments`
 where `status_id` in ('3', '2', '1', '4', '5', '6');

If pluck('id') will be bypassed - everything work as expected.

"When trying to bypass not pluck('id') of collection, but get() to whereIn method "  can you rephrase that? And what does 'trying to bypass not ...' mean?

I am not sure why you would want to bypass it anyway. Now you are just generating unnecessary work for the database to try to find values that are not there.
But even more importantly, imagine if you had relationships in the original statuses table with a different index or a normal int column . Then those values would be also searched as a possible value for the status_id, which you do not want. So in general you should be explicit when defining the values in whereIn. Adding the pluck is a minor deal IMHO.

@lagbox rephrased.
@lasselehtinen I've never tried to drop full collection of items to whereIn method before. Usually I'm using pluck(), transforming\mapping it to array of ids, using joins or whereHas on relation:
$payments = Payment::whereHas('status', function (Builder $query) {
    $query->whereIn('name', [
        'draft',
        'pending_approval',
        'awaiting_payment',
        'paid',
        'paid_part',
        'another_status',
    ]);
})->get();

I've dropped full collection while wrote a quick draft of the future code and saw that not all the expected results was displayed. After debugging output SQL I found that whereIn used each key of the collection as value to find because under the hood it's just converting collection to the array and adds each key to the where statement. Now I see that there is no way to magically resolve what keys should be used for query and there is no way to make get() work exactly the same way as pluck() in whereIn in query builder.

authors: a-komarev lagbox lasselehtinen

repo: laravel/framework


text:
Call to a member function all() on null

Laravel Version: 5.4.15
PHP Version: PHP 7.0.3
Composer 1.4.1

I want to select pages from database
PagesController:
$pages = $this->pages->all();
return view('pages.index', compact('pages'));

in index blade page:

	@if($pages->isEmpty())

		{{ trans('page.no_page') }}

	@else
		@foreach($pages as $page)

				{{ $page->title }}
				{{ $page->uri }}
				{{ $page->name }}
				{{ $page->icon }}

		@endforeach
	@endif

This should return translated message that there are no pages in database, but I'm getting error

FatalThrowableError in PagesController.php line 25: Call to a member function all() on null

$this->pages is not set properly in the PagesController.
This is not an issue with the framework.

It is set properly. I didn't wrote complete code.
class PagesController extends Controller
{
    protected $pages;

    public function __constructor(Page $pages)
    {
        $this->pages = $pages;
    }
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $pages = $this->pages->all();
        return view('admin.pages.index', compact('pages'));
    }

Does __constructor(Page $pages) refer do Page model? If so, you need to use it like this:
$pages = Page::all();

It's working on that way. But, I use $page = $this->pages->all() method in my projects in Laravel 5.2 with injected model and property in __construction method and it works fine.

__constructor => __construct

That's the problem. Thanks.

authors: jerguslejko mirbatworks


text:
Why container rebound event is after resolved not bound

Laravel Version: 5.4.*
PHP Version: php71
Database Driver & Version:

Description:
I want to rebind my class to overwrite MigrationRepository singleton
but I found I should make it first to let rebind singleton work.
Steps To Reproduce:
I just write singleton in service provider not work
       $this->app->singleton('migration.repository', function ($app) {
            $table = $app['config']['database.migrations'];

            return new DatabaseMigrationRepository($app['db'], $table);
        });

I need to make it first to let it work
        $this->app->make('migration.repository');
        $this->app->singleton('migration.repository', function ($app) {
            $table = $app['config']['database.migrations'];

            return new DatabaseMigrationRepository($app['db'], $table);
        });

Please ask on the forums, this repo is for bug reporting only. You can use https://laracasts.com/discuss or https://laravel.io/forum which are forums with a very large community of developers helping each other.

authors: FreedomKnight themsaid


text:
Paginator appends not adding to meta of api resource collection json

Laravel Version: 5.6.11
PHP Version: 7.1
Database Driver & Version: 5.6

Description:
Paginator appends method does not add data in the "metas" of the json data generated by an API resource collection.
Steps To Reproduce:
$pagination = $query->paginate();
$pagination->append([
    'key' => 'value',
]);
return new JsonResource::collection($pagination);

Also would like these key/values to be in the generated "links", for instance
"links": {
    "first": "http://localhost:8000/api/resource?page=1&key=value",
    ...
}

I think you can try
$pagination = $query->paginate();
$pagination->appends([
    'key' => 'value',
]);
return new JsonResource::collection($pagination);

Paginator appends method does not add data in the "metas" of the json data generated by an API resource collection.

Why do you expect that?

@HongjiangHuang Good catch, but it was only a copy-paste typo, I'm correcting the sample

Hmm. I think you use appends, problem solved

@HongjiangHuang Problem is not solved. appends work when returning the paginator in a controller, but does not apply when wrapped by a resource.
By debugging the source in vendor folder, we can see that the data is there, but not used. Only specific keys are used:
https://github.com/laravel/framework/blob/bf975fa30108a873098f8bd8ee348f8f4a3130f6/src/Illuminate/Pagination/LengthAwarePaginator.php#L161
The appends method:
https://github.com/laravel/framework/blob/bf975fa30108a873098f8bd8ee348f8f4a3130f6/src/Illuminate/Pagination/AbstractPaginator.php#L198

oh well.. after test a few times, I see that the appends method does indeed inject in the links section of the json and not the meta. And that seems right to me.
And if I need stuff to appear in the meta I can just use a ResourceCollection.
Thanks for the input.

maybe you want this
` $total_fee = $builder->sum('user_fee');
    $orders = $builder->latest()->paginate(10);

    return OrderResource::collection($orders)->additional([
        'meta' => [
            'total_fee' => $total_fee,
        ]
    ]);

`
then, the meta total_fee in response's meta

On Dec 16, 2018, at 6:08 PM, youruan notifications@github.com wrote:
maybe you want this
` $total_fee = $builder->sum('user_fee');
$orders = $builder->latest()->paginate(10);

return OrderResource::collection($orders)->additional([
    'meta' =>+1 [
        'total_fee' => $total_fee,3500
    ]
]);

`
then, the meta total_fee in response's meta
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

i think this kind of thing should be baked into the framework.. because most times if you have a filter clause (e.g. filter['name'] or w/e. the pagination links dont make sense if they dont have this additional params.. just a fyi.. having to do ^ is a bit annoying

authors: HongjiangHuang desertnightsky isometriq mfn shez1983 youruan


text:
419 Error despite valid token being passed correctly

Laravel Version: 5.7.9
PHP Version: PHP 7.1.17-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: May  5 2018 04:56:28) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.17-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

Description:
Using an out-of-the-box Laravel setup from laravel new appname, CSRF functionality appears to be broken on v5.7.9 but v5.7.3 works perfectly with the server software listed above.
Steps To Reproduce:
https://stackoverflow.com/questions/52764590/laravel-419-error-verifycsrftoken-issue

Can you create a simple Laravel application that doesn't work for you and upload it to GitHub?

appears to be broken on v5.7.9 but v5.7.3 works perfectly

And can you confirm exactly what version stops working? i..e does v5.7.4 work or not etc?

CsrfCausing419.zip
^ There is the barebones code for the project demonstrating the issue. When you submit the form on the homepage, it returns a 419 error. This happens regardless of whether using ajax submission like in the project (still providing the _token value) or submitting the form the old fashioned way.

The form works for me. Can you reproduce the issue in Homestead?

Heh, I swore it said 5.7.9 when I ran php artisan --version. Anyhow, I have tested in Homestead which works fine. It's just on my ubuntu server with nginx that does not work. Perhaps it's related to the server software or configuration?

What about the versions between 5.7.4 and 5.7.9?

Is there a faster way to check each version than by running laravel new appname --5.7.x and copying all the modified files to the newly created Laravel app? Perhaps a like a laravel upgrade -5.7.x or something similar?

Set a specific version of the laravel/framework package in your composer.json file and run composer update.

Thank you, that was much less painless than I had first anticipated. I started using Laravel earlier this year and I haven't yet had a reason to use composer, which is very nice.
I have done this for 5.7.4 and it began giving me the 419 error on my webserver. I will continue to test the additional versions as time permits, though they probably will all give the 419 if the bug was introduced in 5.7.4 - I guess we'll see soon enough.

5.7.5 confirmed also throws the 419.

@Xerotherm1c Just test your source code and it works fine for me.

Ok not cool, it's no longer working on 5.7.3 for me, including the sites that were working before. I think the apt-get update may have borked it entirely for me.

Did you try delete vendor and install it again?

I just deleted the vendor folder and re-ran composer update with 5.7.3 and uploaded it to my server. Still throwing the 419. Are there any commands I would need to run to reload everything on my server, like php artisan cache:clear or php artisan config:cache?

Maybe you forget delete composer.lock file before run composer update

Maybe you forget delete composer.lock file before run composer update

Well I've been running php artisan --version to verify my version updates are in fact making it to my webserver each time, but I do have a composer.lock file in the folder. I can delete it and try it again if you think that might cause an issue.

Deleting the composer.lock file and retrying did not affect the result - still getting the 419. Also, for what it's worth, composer update is recreating the composer.lock file when I run it.

If you're sure with version, I think the issues from your server, not laravel bug. One more thing why you need to update vendor folder to your server instead of run composer update in your server.

I'm running an nginx server and I listed my packages in a previous comment. Do you have any idea what might be wrong on my end that would cause Laravel's Csrf token system to malfunction?
Are you saying I can just overwrite the vendor folder to change the Laravel version? And do I need to run any commands for the updated version to fully kick in / take effect?

Well using a List Comparison, I compared my webserver's packages to Homestead Vagrant's. Looks like Vagrant is running Xenial Xerus but my webserver is running Bionic Beaver.

I'm closing this - as it is clearly not a Laravel Framework issue, but something with your server setup.
The problem is not with "CSRF" - but with your sessions not persisting (which will cause a by-product of CSRF not working).
Please try asking your question on one of the many great community support areas that will likely give you a better answer more quickly:

Laravel Slack (https://larachat.co/)
Laravel.io Forum (https://laravel.io/forum)
Laracasts Forum (https://laracasts.com/discuss)
StackOverflow (http://stackoverflow.com/questions/tagged/laravel)

If you feel I've closed this issue in error, please provide more information about how this is a framework issue, and I'll reopen the ticket.
Thanks in advance.

Um, is the fact that this doesn't work with Ubuntu's latest LTS not a problem?

It does - I use it myself with no issues. It's something with your setup or config.

Ok so I rebooted my server and I am testing 5.7.3 which is working for me. Not sure why it didn't work previously or if that was unrelated, but 5.7.3 is working. So at this point I have no idea if it's Laravel of my server. If it's working on 5.7.3, then that means my sessions are in fact persisting - at least on 5.7.3, right?

Yes.
Now try the latest version. 5.7.9. Does that work?
If not - go through each version in between and tell us exactly which version breaks, and I'll look into what changed in that version.
To do this go into composer.json and change
- "laravel/framework": "5.7.*",
+ "laravel/framework": "5.7.4",

and keep changing the version until you find the exact spot it breaks.

Yes.
Now try the latest version. 5.7.9. Does that work?
If not - go through each version in between and tell us exactly which version breaks, and I'll look into what changed in that version.
To do this go into composer.json and change
- "laravel/framework": "5.7.*",
+ "laravel/framework": "5.7.4",

and keep changing the version until you find the exact spot it breaks.

Ok, I believe I performed this test correctly when I posted this comment, and the version that starting throwing the 419 was 5.7.4 - can you review my steps that I posted I took to make sure I tested correctly? If not, I can perform the test again tomorrow after I relieve myself of sleep deprivation lol.
Thanks for the help.

These changes were made in 5.7.4: https://github.com/laravel/framework/compare/v5.7.3...v5.7.4
None of them look "suspicious".

Yeah...
It's possible its another package that changes during the version change (due to 'min' requirements).
Are you using a file driver? Try Redis or something else and see how that goes.
But as others have said - we cant replicate, so it is somehow related to your server config.

Yeah...
It's possible its another package that changes during the version change (due to 'min' requirements).
Are you using a file driver? Try Redis or something else and see how that goes.
But as others have said - we cant replicate, so it is somehow related to your server config.

Sorry, can you elaborate on the file driver question? I just have a webserver running nginx where I copied up the Laravel site.

@laurencei is referring to the session.driver config option (https://laravel.com/docs/5.7/session).
You can try a different driver like database or redis.

I have the same problem

419
Sorry, your session has expired. Please refresh and try again.

At least as far as my Homestead vagrant dev box goes, I was able to overcome the 419 with a simple vagrant box update from version '5.1.0' to '6.3.0'. Are there specific packages in this upgrade that might cause the newer Laravel versions to throw a 419 error on older vagrant versions?

@Xerotherm1c Can you reliably reproduce the issue in Homestead? What Laravel version are you using?

I have Laravel 5.7.14, have docker locally and on Prod, both having this issue. Forced to turn-off some routes in VerifyCsrfToken.php. Didn't have it on 5.6.*

Migrated from 5.6 to 5.7. Using @csrf token in 5.7, but with old approach {{ csrf_field() }} doesn't work as well.

You may be onto something with the {{ csrf_field() }} approach causing issues. I've been using @csrf in the project I'm currently working on with absolutely no issues so far.

Migrated from 5.6 to 5.7. Using @csrf token in 5.7, but with old approach {{ csrf_field() }} doesn't work as well.

You may be onto something with the {{ csrf_field() }} approach causing issues. I've been using @csrf in the project I'm currently working on with absolutely no issues so far.

Unfortunately, both of them doesn't work.

I'm also running into this issue locally on Ubuntu Bionic Beaver and it also happened once on a staging server. It happened on a vagrant up this morning.  When it occurred on the server, it was after doing an update to the project and running composer install. I can consistently clear the error when I delete my browser cookies.

I have the same problem.
On Mac High Sierra, Laravel 5.7.9 it's ok
On Staging Server Ubuntu 18.04 Laravel 5.7.15, 419 error.
I'll try to downgrade to 5.7.9 and keep you posted.

@KeitelDOG Do all POST requests fail or only some of them? What session driver are you using?

Still not working on ubuntu after downgrading. @staudenmeir yes for all posts I suppose, I tried Login and Register.  I'm using file session.

Can anyone reproduce this issue on a fresh Laravel installation?

Now I just retry it in my Mac without clearing any browser cache nor cookies and it works. I don't think it's a laravel Issue because the code does not change at all. Could it be a Browser cache, cookie or Browser - Server communication problem that disappears after some times?
This problem happened to me before on a Laravel 5.6 with Apache on Ubuntu 18.04, and the day after I went to debug it but it was working fine. And today same thing.
I suspect some strange behavior from Browser - Server communication that keeps inappropriate data for some times that causes the bad data to be passed. And once the time passes and the inappropriate data get flushed, then it starts to work great again.
If that's the case, I have no idea of what would generate this inappropriate data in browser? new PHP 7+? Chrome Browser?
I used Chrome only when I found the error.

Did anyone experience this issue with a browser other than Chrome?

Reading all the comments - it is clear this is a mixture of different
issues, but all boils down to a session persistence issue.
In most cases the sessions are just not setup correctly, and when a
form is submitted, the lack of session means the CSRF fails, and you
get a 419 error.
You can self diagnose this issue by turning off CSRF, and trying to
login. If you can’t login (because you keep going back to the login
page) - then your sessions are broken and you need to fix that.
If you can login, then you probably have a mis-configured CSRF token
in your form, and you need to fix that.
Any specific issue with Chrome is likely to be a session issue (which
appears as a CSRF issue - but that’s because the session is broken).
But we know that all Chorme versions work with all Laravel versions
out of the box, which means if there is an issue, it is somehow
related to the local config/setup.
The other possibility is a JS related issue, where one browser works
and another doesn’t depending on what your JS code is doing.

@staudenmeir I've experienced the issue in Firefox as well.  I agree with @laurencei that is seems like this stems from a cookie/session issue.  It could be that I hadn't visited the project over the long holiday weekend (about 5 days) - so maybe whatever was saved in my cookie was no longer valid and didn't renew. Hopefully the issue comes back at me so I can try and trace this through.

Also, I can also confirm that when this occurred on the server, I was able to comment out VerifyCsrfToken to get the forms to work (re-enabling brought back the issue).

I did the same thing again this morning in the Staging Server with Ubuntu 18.04. The login session expired cause it asked me login again. And when I did, 419 error again. I will investigate printing the session data and cookie data to see the difference.
@zyglobe if it happens to Firefox also, maybe Laravel sent an outdated cookie or so...
If the problem can't be solved now, I can't upgrade Production yet.

@KeitelDOG Does this occur if you use a different device/browser that had not previously accessed the site before?

I sacrificed whole day trying to figure it out. And I think I've found some good hints.
I break my AuthController@signin and use Codes from VerifyCsrfToken to see output. I added echo and print_r to the Illuminate\Session\Store to debug.
public function signin()
	{
        try {

        	echo 'Request Session Token :
'.request()->session()->token().'
';

	        $token = request()->input('_token');
	        echo '
Request Session Token :
'.$token.'
';
	        \Megalo::addAppLog('_token : '.request()->input('_token'), "VerifyCsrfToken");

	        echo '
Request Session Object array :
';
	        print_r(request()->session());
	        echo '
';

	        clearstatcache();
			echo '
storage/framework/sessions directory permission :
'.substr(sprintf('%o', fileperms(storage_path('framework/sessions'))), -4);
			echo '
';

        	$isMatched = is_string(request()->session()->token()) &&
               is_string($token) &&
               hash_equals(request()->session()->token(), $token);

            if ($isMatched) {

                \Megalo::addAppLog('Verification passed. Tokens Matched', "VerifyCsrfToken");

                foreach (\Megalo::$appLogs as $log) {
		            echo $log["level"]."/".$log["place"]." : ".$log["desc"]."
";
		        }

                return 'OK';
            }
        }catch(Exception $e) {
            echo $e->getMessage().' - '.$e->getFile().' - '.$e->getLine();
        }

        //throw new \Illuminate\Session\TokenMismatchException;
}

And here is the results.
For DEV with SIMILAR BUG with limited permission 440, owner and group (_www => Mac), I get :
Request Session Token :
C0U9SaZBrHUqDESGNytJwAsgFFPL1n0ooBkjA2WF

Request Session Token :
zDx4hMGaw3xNt8cvTrJBMEBj37aoPvqVBsJKfmkD

Request Session Object array :
Illuminate\Session\Store Object ( [id:protected] => WChNe9QnXi7vxcW1LTgB4h8WYvE5y6RXOP91AuKJ [name:protected] => megalobiz_dev_session [attributes:protected] => Array ( [_token] => C0U9SaZBrHUqDESGNytJwAsgFFPL1n0ooBkjA2WF ) [handler:protected] => Illuminate\Session\FileSessionHandler Object ( [files:protected] => Illuminate\Filesystem\Filesystem Object ( ) [path:protected] => /private/var/www/megalobiz/storage/framework/sessions [minutes:protected] => 2592000 ) [started:protected] => 1 )

storage/framework/sessions directory permission :
0440

But for DEV that is working with enough permission 550, owner and group (_www => Mac), I get :
Request Session Token :
zDx4hMGaw3xNt8cvTrJBMEBj37aoPvqVBsJKfmkD

Request Session Token :
zDx4hMGaw3xNt8cvTrJBMEBj37aoPvqVBsJKfmkD

Request Session Object array :
Illuminate\Session\Store Object ( [id:protected] => WChNe9QnXi7vxcW1LTgB4h8WYvE5y6RXOP91AuKJ [name:protected] => megalobiz_dev_session [attributes:protected] => Array ( [_flash] => Array ( [new] => Array ( ) [old] => Array ( ) ) [_previous] => Array ( [url] => http://localhost ) [_token] => zDx4hMGaw3xNt8cvTrJBMEBj37aoPvqVBsJKfmkD [guest_id] => Array ( [0] => Mv2xJEawXImP38gF2gpz0euCX4RQqB_1543601170 ) [last_briefed] => 2018-11-27 01:11:10 ) [handler:protected] => Illuminate\Session\FileSessionHandler Object ( [files:protected] => Illuminate\Filesystem\Filesystem Object ( ) [path:protected] => /private/var/www/megalobiz/storage/framework/sessions [minutes:protected] => 2592000 ) [started:protected] => 1 )

storage/framework/sessions directory permission :
0550
debug/BaseController : Megalo initialized
debug/VerifyCsrfToken : _token : zDx4hMGaw3xNt8cvTrJBMEBj37aoPvqVBsJKfmkD
debug/VerifyCsrfToken : Verification passed. Tokens Matched
OK

THIS IS WAT IS HAPPENING :
With Laravel Code in Illuminate\Session\Store class
    /**
     * Start the session, reading the data from a handler.
     *
     * @return bool
     */
    public function start()
    {
        $this->loadSession();

        if (! $this->has('_token')) {
            $this->regenerateToken();
        }

        return $this->started = true;
    }

    /**
     * Load the session data from the handler.
     *
     * @return void
     */
    protected function loadSession()
    {
        $this->attributes = array_merge($this->attributes, $this->readFromHandler());
    }

    /**
     * Read the session data from the handler.
     *
     * @return array
     */
    protected function readFromHandler()
    {
        print_r($this); // added by me
        echo '

'; // added by me

        if ($data = $this->handler->read($this->getId())) {
            $data = @unserialize($this->prepareForUnserialize($data));

            if ($data !== false && ! is_null($data) && is_array($data)) {
                return $data;
            }
        }

        echo 'session empty in  readFromHandler '.get_class($this->handler).'

'; // added by me

        return [];
    }

So when Session read the File from FileSessionHandler or CookieSessionHandler which implement SessionHandlerInterface with read, write, destroy methods etc., if Session doesn't find the _token attribute, then it regenerates Token, and therefore, when Laravel compares the File Session Token in VerifyCsrfToken with the passed token in request()->input('_token'), it fails.
One reason can be because of limited permission, which can recreate the Bug in Dev, but not this actual bug we're facing.
Another reason is that the passed Token via input can be different or inexistant, so the Token Mismatch Exception will raise.
On Staging Server, here is my Output :
Illuminate\Session\Store Object ( [id:protected] => e4Em43rkBART7BlTgsT7PneLg572RDDFWnvjCVw3 [name:protected] => megalobizstaging_session [attributes:protected] => Array ( ) [handler:protected] => Illuminate\Session\FileSessionHandler Object ( [files:protected] => Illuminate\Filesystem\Filesystem Object ( ) [path:protected] => /var/www/megalobiz/storage/framework/sessions [minutes:protected] => 2592000 ) [started:protected] => )

session empty in readFromHandler Illuminate\Session\FileSessionHandler

Request Session Token :
jJYOEmm920oU5JSQd6h8xfpaj1nugtWG6hPlQgkf

Request Session Token :
4ExdeLOtbTnO9LGW3jDpP2BBMJe9KCTEfMjJJie8

Request Session Object array :
Illuminate\Session\Store Object ( [id:protected] => e4Em43rkBART7BlTgsT7PneLg572RDDFWnvjCVw3 [name:protected] => megalobizstaging_session [attributes:protected] => Array ( [_token] => jJYOEmm920oU5JSQd6h8xfpaj1nugtWG6hPlQgkf ) [handler:protected] => Illuminate\Session\FileSessionHandler Object ( [files:protected] => Illuminate\Filesystem\Filesystem Object ( ) [path:protected] => /var/www/megalobiz/storage/framework/sessions [minutes:protected] => 2592000 ) [started:protected] => 1 )

storage/framework/sessions directory permission :
0777

When Laravel creates a session file, it creates it with permission 644,  -rw-r--r--, that could be the reason why when I tested in Dev, 440 did not work, because execute permission is missing.
@zyglobe I just tested the Staging with my Phone, Chrome browser, and the Session is ok and accessible.
But now I'm stuck because I can't understand why would 644 permission block me vi Mac, and not via Phone. Via Android Phone, the session file is stil with 644.

@KeitelDOG - as I mentioned earlier - what you've described is simply a session persistence issue and has nothing to do with CSRF (but the CSRF error you get is because of the session failure).
Looking at your code above, if you have different permissions, then once again it's nothing to do with Laravel. If you google around, there's a few examples of how to change the user settings for directories; essentially you need to make sure the web user has the right permission to write to the storage folder along with your console user.
It sounds like your web user does not, and therefore sessions are failing.
You could also switch to a different session system, like Redis or Memcache, which is probably better for a production server.

Can anyone reproduce this issue on a fresh Laravel installation?

Yes. Downloaded a laravel version yesterday. The odd thing is I created 2 projects at once. The one project gives the 419 on login, the other doesn't... Same server, same configuration as far as I know... I'll be uploading my projects soon.

I've been using the redis driver all along (so file permission issues, while already set correctly, wouldn't have been the problem).  However, I discovered that I'm dealing with an intermittent redis or predis connection issue (even with read_write_timeout set to -1).
local.ERROR: Error while reading line from the server. [tcp://127.0.0.1:6379]
Just offering what I found in case someone else stumbles upon this thread with a similar issue/scenario.

RESOLVED
I finally resolved it, so this is NOT a Laravel Bug, but I think Laravel developers could handle this behavior themselves.
It was a problem with the Cookie conflicts between different environment on the same browser. That's why other browsers that access only production didn't have that problem.
To resolve any of the 419 related error :
Check Permission
After making sure your permission is ok for creating and accessing the file as I suggested earlier :

I finally see that it's probably not a Laravel issue. @magusd the are many ways of solving this according to what happened.
I have reproduced this error in so many ways that it started to freaking me out. But at the end, it's a permission access to that file before Laravel accesses it. Here the many Layers that could be denying the permission :

storage/framework/sessions owner or group does not belong to Apache or Nginx User let's say www-data
storage/framework/sessions owner or group belongs to Apache or Nginx User let's say www-data, but does not have read and write permission to either owner or group. You should change permission with chmod and give 6 at least to owner or group.
umask has been changed in your Apache or Nginx settings. Default umask in Apache is 0002 => 0664 which gives read and write permission for owner and group, and read for everyone, for created files with config user www-data, and => 0775 for created directories. Default umask in lastest NGinx is 0022 => 0644 which gives read and write only to owner for created files, and => 0755 for created directories. So that could be some server config has changed and does not give enough permission to read existing sessions files. So you should checkup to.
umask in PHP can be dynamically changed, so if you changed it early in your code to umask(0666); and not changed it back to umask($oldUmask); before Laravel create the session files, then the newly created session file will have permission 0000 with no read access at all.

But I resolved and controlled all of this, but the permission problem persist sometimes. So if Laravel did not messed up with the file permissions just before accessing it, it can't be a Laravel bug for sure.
Maybe the System itself create a strange behavior to limit the permission on some special cases that I cannot catch.
I give up on this cause this doesn't seem a Laravel coding error. Instead thanks to @laurencei I'm already changing to Redis for Staging to test before I apply it to production, this way I won't get anymore Sessions permission access.

Change your ENVIRONMENT Variables
Then I used this configuration in my LOCAL .env file :
APP_NAME=Megalobiz
...
SESSION_COOKIE=mbdck
SESSION_DOMAIN=localhost
...

and this in my STAGING .env file :
APP_NAME=Megalobiz
...
SESSION_COOKIE=mbsck
SESSION_DOMAIN=10X.24X.X.4X
...

APP_NAME doesn't have to be unique. But I heard some places that Laravel had issues with underscore SESSION_COOKIE, so instead of using default :
'cookie' => env(
        'SESSION_COOKIE',
        str_slug(env('APP_NAME', 'Megalobiz'), '_').'_session'
    ),

to produce a session cookie name megalobiz_session, I just add my own and UNIQUE session cookie name SESSION_COOKIE=mbsck from MegaloBiz Staging CooKie. This way the Browser won't get the same cookie name for your LOCAL, STAGING and PRODUCTION environment.
After that I don't know if it's necessary, but I put SESSION_DOMAIN as localhost, IP or domain name if Server is running through DNS.
Clear Cookies
AND FINALLY, after making those changes, *DO NOT FORGET TO CLEAR THE COOKIES on the LOCAL or STAGING or PRODUCTION if you changed the Environment variables because the Browser will keep the old Session Cookie name because it's not expired yet, megalobiz_session in my case.
And I get my new SESSION COOKIE name as mbsck. And I logged in the 1st time 💯
AVOID MAKING THIS IN PRODUCTION
BE CAREFUL NOT TO CHANGE THIS ON YOUR ALREADY RUNNING PRODUCTION SERVER because it will invalidate sessions for all other browsers (Users) that has the old session cookie name not expired and they won't know if they must clear that cookie in their browser. Instead clear your other cookies for other environment and keep your default config for production.

I'm still getting the same error on the other Server with Laravel 5.6, so I went to look for how Chrome Browser handle cookies on request. Chrome is more strict than other browsers.
The answer to the StackOverflow Question Why does the session cookie work when serving from a domain but not when using an IP? explains a lot of important things. He mentioned an HTTP RFC 2019 Document where they state :
4.3.2  Rejecting Cookies

   To prevent possible security or privacy violations, a user agent
   rejects a cookie (shall not store its information) if any of the
   following is true:

   * The value for the Path attribute is not a prefix of the request-
     URI.

   * The value for the Domain attribute contains no embedded dots or
     does not start with a dot.

   * The value for the request-host does not domain-match the Domain
     attribute.

   * The request-host is a FQDN (not IP address) and has the form HD,
     where D is the value of the Domain attribute, and H is a string
     that contains one or more dots.

   Examples:

   * A Set-Cookie from request-host y.x.foo.com for Domain=.foo.com
     would be rejected, because H is y.x and contains a dot.

Kristol & Montulli          Standards Track                     [Page 7]

RFC 2109            HTTP State Management Mechanism        February 1997

   * A Set-Cookie from request-host x.foo.com for Domain=.foo.com would
     be accepted.

   * A Set-Cookie with Domain=.com or Domain=.com., will always be
     rejected, because there is no embedded dot.

   * A Set-Cookie with Domain=ajax.com will be rejected because the
     value for Domain does not begin with a dot.

4.3.3  Cookie Management

   If a user agent receives a Set-Cookie response header whose NAME is
   the same as a pre-existing cookie, and whose Domain and Path
   attribute values exactly (string) match those of a pre-existing
   cookie, the new cookie supersedes the old.  However, if the Set-
   Cookie has a value for Max-Age of zero, the (old and new) cookie is
   discarded.  Otherwise cookies accumulate until they expire (resources
   permitting), at which time they are discarded.

   ...

Those specs would tell browsers to ignore malformed or non-standard Set-Cookie format so that sometimes Chrome just won't send those cookies in the requests to your server.

Today I tested, confirmed and resolved the 419 error (that is not related to file permission) for the 4th times for that same month. Cause it also happen with Redis as the Session Driver.
What I can confirm is that happens :

Specially on Chrome, even on Chrome Mobile for Android
When using multiple environment in the same browser and one of them is IP address, ex : local (localhost) + production (120.130.140.150). The production is not accessible via DNS yet

And the conflict and error are resolved when :

Using a domain name to access the Servers (except localhost)
waiting a mid day sometimes for Chrome to clear some cache, or clearing cookies of IP address

I tried with IP, error, activate DNS, no error, deactivate DNS, error appears again.
Tested with my 2 Old VPS and 2 New VPS (staging + production) with IPs and 2 domain names.

authors: KeitelDOG OnePeople PieterjanDeClippel Xerotherm1c artemnl laurencei phannaly staudenmeir zyglobe


text:
Error : Class "Illuminate\Support\Testing\Fakes\UpdatedBatchJobCounts" not found

Hello everyone!
Seems like import of UpdatedBatchJobCounts is missing here:
https://github.com/laravel/framework/blob/23e8dd8fac5910edd20327a23529b52af8a77268/src/Illuminate/Support/Testing/Fakes/BatchFake.php#L128
I opened a PR with a fix https://github.com/laravel/framework/pull/44435

Thanks! I saw your PR so let's follow up there.

authors: driesvints sashaskr


text:
RefreshDatabase trait issue when using mysql instead of sqlite + in-memory database

Laravel Version
10.10
PHP Version
8.1
Database Driver & Version
MySQL 8.0.27
Description
On a fresh Laravel + Breeze(blade) install,
When mysql database is used for phpunit instead of sqlite, the user email(test@example.com) used in test_profile_information_can_be_updated and test_new_users_can_register causes a conflict.
This results in the following error
1) Tests\Feature\ProfileTest::test_profile_information_can_be_updated
Session has unexpected errors:

{
    "default": [
        "The email has already been taken."
    ]
}
Failed asserting that true is false

Changing the email(test@example.com) in either of the 2 tests fixes the issue for time being.
A proper fix will likely require updating RefreshDatabase trait for mysql or not-in-memory databases.
Steps To Reproduce
Install Laravel (use mysql DB)
Install Breeze
(keep default database config for phpunit.xml)
./vendor/bin/phpunit

After freshly installing Breeze in my Laravel project and configuring MySQL in my .env file, I have been unable to replicate the problem you mentioned:
➜ ./vendor/bin/phpunit
PHPUnit 10.1.3 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.2.5
Configuration: /Users/nunomaduro/Work/Code/laravel/phpunit.xml

........................                                          24 / 24 (100%)

Time: 00:01.250, Memory: 40.50 MB

OK (24 tests, 56 assertions)

And, I can confirm that the main purpose of the RefreshDatabase trait is to clear the database between tests, so the scenario you described is unlikely to occur.
That been said, can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

authors: absarakram nunomaduro


text:
Adding leading zeros to string don't get saved to database

Laravel Version
10.40.0
PHP Version
8.2
Database Driver & Version
MySQL 8.0.30 on CentOS 7 (x86)
Description
Let's say we have an eloquent model Test, that has a string property prop. A database record exists where prop contains the string value "1234". We load this record using eloquent models, and update the value to contain leading zeros like this:
$model->prop = "01234";
$model->save();

In this case, the database value will not be updated. This is caused by the following code in src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php on line 2103:
return is_numeric($attribute) && is_numeric($original)
            && BigDecimal::of($attribute)->isEqualTo($original);

Since the string values do pass is_numeric and their number counterparts are equal, the property isn't considered dirty and the field isn't updated. These string values might represent totally different things in the database and shouldn't be considered equal in all cases.
I understand changing this might impact existing codebases, but is there any way we can provide an easier escape hatch than overwriting HasAttributes::originalIsEquivalent (as overwriting core functionality tends to break in the future)?
Steps To Reproduce

use Illuminate\Database\Eloquent\Model;

/**
 * @property string $prop
 */
class Test extends Model {
  protected $fillable = ['prop'];
}

$test = new Test(['prop' => '1234']);
$test->save();

$test->prop = '01234';
$test->save(); // saving doesn't happen because prop isn't considered dirty

This seems to be happening because no explicit cast has been defined and it has to guess the data type. I believe you can workaround this by explicitly casting to string:
class Test extends Model {
    protected $fillable = ['prop'];
    protected $casts = ['prop' => 'string'];
}

See: https://github.com/laravel/framework/blob/10.x/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php#L2092-L2094

authors: rojtjo vixducis


text:
[5.2] passesAuthorization() should not call authorize() (?)

passesAuthorization() calls upon authorize(), which seems to recursively call back passesAuthorization(). I envision authorize() actually setting a protected member as a bool, that that's what passesAuthorization() is the acting getter for.
basically, should passesAuthorization() actually be calling authorize()?

I'm confused. Why does your authorize method call back into passesAuthorization?

This doesn't appear correct to me.

I think my confusion arises because the validate() method on ValidatesWhenResolvedTrait also performs an authorization check, which was not what my expectations are for the behavior of a validator. In any case, thanks for taking a look.

authors: jwdeitch taylorotwell


text:
[5.3] Ignore invalid or empty values in lines

Just one more minor fix to ignore empty or non-string lines passed to notification.
I am not sure if an exception should be thrown here.

Hrm. Not sure all this validation is really necessary. Why would you pass non-string lines? :laugh:

As far as we have Action passed there, other implementations may be caught before like this
public function with($line)
{
    if ($line instanceof CustomThing) {
         return $this->attachCustomThing($line);
    }

    return parent::with($line);
}

P. S. I really like this package and want to make it more flexible for extensions — have a lot of ideas for drivers and features 😄

Holding off on this for now.

authors: rkgrep taylorotwell


text:
[5.3] Pass keys to Collection::unique callback

...to be consistent with the rest of our callbacks, especially sortBy.
/cc @jbrooksuk

👍

authors: JosephSilber jbrooksuk


text:
Fix CacheFileStore Increment Concurrent Writes

Fix #24496
Route::get('/init', function () {
    \Illuminate\Support\Facades\Cache::forever('num',0);
});

Route::get('/inc', function () {
    \Illuminate\Support\Facades\Cache::increment("num");
});

Route::get('/get', function () {
    $num = \Illuminate\Support\Facades\Cache::get("num");
    dd($num);
});

visit http://hostname/init
ab -c10 -n2000 http://hostname/inc/
visit http://hostname/get

You will find that the result is always less than 2000, This pr is solved through a mutex lock.

I suggest using a more robust cache storage layer if you need atomic counting operations... like Redis. Laravel offers Redis and Memcached drivers out of the box.

Hello, I know that redis can be used, but I think this is a bug that should be fixed. Since this method is provided, it should be able to be used normally, and the tested performance has not declined.

authors: sinchie taylorotwell


text:
[5.9] Make storage link relative by default

This pull request

uses a relative path for the public/storage symlink by default, enabling usage regardless of mount points (host machine / guest VM),
adds an --absolute option for cases where an absolute path is desired, and
adds a --force option to overwrite existing public/storage entries, enabling the command to be an idempotent operation.

The change has been proposed before, and attempted at least twice, but both previous pull requests failed to take configurable storage path into account.
This pull requests uses webmozart/path-util to determine the relative path.

This seems like a good package idea to me tbh.

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

has there been any news about this? has this code been released to a package like Taylor mentioned?. It's still a pain not having the relative storage link when you work in docker (or similar) environments

IMO relative paths should be default behavior.
@taylorotwell, is there anything that would make this patch more acceptable?
Windows is capable of handling the / path separator, so adapting DIRECTORY_SEPARATOR doesn't seem like an improvement.

I would find the relative path useful for development as I mirror my projects on a virtual machine that acts as the nginx host and the absolute link causes problems, depending on where I've called storage:link. It's trivial to fix, but I would have thought a relative link would be more flexible in general anyway (unless I'm missing something?)

authors: crishoj driesvints kuremu marcosdipaolo taylorotwell


text:
Application flush

Improves flushing of application/container.
Reduces memory usage in tests by several percent.

Please send to master. :)

authors: Firtzberg GrahamCampbell


text:
[9.x] Fix whereIn doc block changes for column parameter

Doc Block changes for the $column parameter on the whereIn method.
Larastan throws an error when we put an expression on the whereIn method. Because, as per the framework doc block expecting string only.
For Example:
by default whereIn method filter record case insensitive but we need to filter out the records as per in case sensitive for that we need to do like:
whereIn(DB::raw('BINARY name'), ['abc', 'abcd']) and, DB raw returns the Illuminate\Database\Query\Expression that's why we need to updates the doc blocks.
These changes don't affect the functionality and do not need to be written tests.
This is my first PR to the framework. if there is anything, feel free to update me.
Thanks,

No plans to merge atm. There are lots of places where this would potentially need to be updated?

@taylorotwell
So, Can we do this for all the modules? Can we make this in a single PR or do we need to follow any other flow?

authors: hirenkeraliya rajan-parmar taylorotwell


text:
[11.x] Fix: Added unreported @throws to doc-block in FoundationServiceProvider

This PR, adds some unreported @throws BindingResolutionException over the FoundationServiceProvider.
Thanks!

I just usually add these doc blocks unless the method itself throws that exception.

authors: afpinedac taylorotwell


text:
Serialization of an Exception is not possible inside the closure

Serializable Closure Version
1.3.1
PHP Version
8.2.8
Description
Serialization of an Exception inside the serializable closure results with the Serialization of 'Closure' is not allowed exception. This is most likely caused by an attempt to serialize the stack trace, which contains the serializable closure itself, but this time without the ability to do its magic.
And, frankly, I'm not sure if there's anything that can be done about it, other than adding another warning to the documentation. You can't do much with an already existing Exception object and its stack trace.
Steps To Reproduce
This issue is very easy to reproduce:
$closure = new \Laravel\SerializableClosure\SerializableClosure(function() { return serialize(new \Exception('boom')); });
echo $closure();

This works as expected:
$closure = function() { return serialize(new \Exception('boom')); };
echo $closure();

Hi there. I don't think it ever was intended to serialize an exception like this indeed. Can you send in a PR to the docs? Thanks!

authors: borys-p driesvints

repo: laravel/serializable-closure


text:
import local grammar file

I there a way to import grammar from local files other that common?
It seems a very useful feature to write large grammars in a neat and clean way.

Thanks, the concatenation of rules seems a good idea!
Both of them, especially the rules. For example, I want to write a datetime parser and it need to parse numbers, so like to import numbers grammar that I wrote previously.

Sure, it's a desirable feature. I plan to support this in the future.

authors: azarezade erezsh

repo: lark-parser/lark


text:
Incorrect stub file

Describe the bug
the file lark-stubs/lark.pyi at Lark.__init__ does not contain the new cache option parameter. This leads to some ides thinking that cache is an invalid parameter (tested in pycharm).
To Reproduce
Just install pycharm, create a project with lark and create a lark object with the cache option. Pycharm should warn about unexpected arguments.
Missing cache optione here:
https://github.com/lark-parser/lark/blob/b5abf2d7afcd70af2be6c57aa454e532c8a99a0b/lark-stubs/lark.pyi#L36-L61

These files are not auto generates, because there is a lot of internal stuff that shouldn't normally be exposed. A simple PR would be appreciated.

authors: Inky-developer MegaIng


text:
DDLS error uninstalling

Error while uninstalling https://github.com/jasper07/Teched17
Guess this is due to dependencies, however did not debug it

Yep, CDS view Zi_Te_Flight is used by other views. The same error occurs when I try to delete it in eclipse.

hi,
in https://github.com/larshp/abapGit/blob/e81748abdfdb3ba8b19ce0ed52b0ce2f1503f608/src/zabapgit_objects_impl.prog.abap#L280 there is special code to handle the deletion sequence of objects, if we can find the dependencies for the DDLS, then we can make sure these are deleted first

sounds like a good idea. I'll try it.

closing, now the repo can be uninstalled

repo: larshp/abapGit


text:
docs(commands): fix "command" not available in options

Semantic pull request template
This repository uses semantic release for automatically managing changelogs, package versions and GitHub releases. This PR must follow the below semantic release rules.

Pull request title
The title must follow the naming scheme type(scope): Title, e.g. feat(component-xyz): add click event and be in present tense.
Types
Available types can be found here.
Scopes
The scope is optional but you can set it e.g. to the component or feature that this PR is about. Setting the scope to no-release will not trigger a semantic release after the PR is merged.

Pull request description
Describe all important changes of this PR in present tense.
If the PR contains breaking changes (not backwards-compatible) you must add the keyword BREAKING CHANGE: or BREAKING CHANGES:. For example:
BREAKING CHANGE: Remove property "myProp" from component XYZ

Thanks for your contribution! The PR is merged and released on: https://discordplayerplus.lars-rickert.de/guide/commands.html

authors: larsrickert needhamgary

repo: larsrickert/discord-player-plus


text:
Can't deal with bash? (in the Doom Emacs fork)

I am editing a foo.bash file with #!/usr/bin/env bash.
emacs already show its in sh[bash] mode.
but:
Failed to format buffer due to errors
Formatter error output:
<standard input>:3:40: arrays are a bash feature

Failed to format buffer due to errors

while line#3 is:
root_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd .. && pwd)

Interesting. Can you send the output of the following shell commands?
shfmt -version
echo '${BASH_SOURCE[0]}' | shfmt
echo '${BASH_SOURCE[0]}' | shfmt -ln bash

On my computer, shfmt -version is v2.5.1

In your situation, format-all should give the command line flag -ln bash to shfmt to say that it's a bash script, so something is clearly going wrong here.

maybe bash is not passed to shfmt?

OK, that's exactly the output I get as well. That does indeed seem to be the only option.  I don't know how much Emacs Lisp you know, but the relevant code in format-all is like this:
(format-all-buffer-easy
    executable
    "-ln" (cl-case (and (boundp 'sh-shell) (symbol-value 'sh-shell))
            (bash "bash")
            (mksh "mksh")
            (t "posix")))

So it tries to look at the value of sh-shell in the buffer being formatted.

Is it because bash is not 'bash'?

That look all right as well.

Do you have the latest version of format-all? The version number can be seen in M-x list-packages. I don't think any relevant changes have been made to new versions, but I can't think of anything else...

weird, can't find format-all in list-packages.
though I can find in local dir.
I am using https://github.com/hlissner/doom-emacs

OK, I don't know anything about Doom Emacs. Thanks for communicating the bug to them :)

The codes about format in doom-emacs is not too much. But I am a newbie to emacs migrating from vim, I can't check the codes to figure out the problems.

That's cool, welcome :) No problem.
I checked the doom-emacs source code and the modules/editor/format directory doesn't seem to be in the main repo. In fact, I can't find the whole modules/editor directory there at all. Is it a separate module?

I use the develop branch which is the recommanded one. I guess you are checking the master branch?

Thanks. I didn't realize to look there. It seems they made a custom fork of the entire format-all package with lots of custom changes. I'll open a separate issue about that.

Any progress?

oh, I see https://github.com/lassik/emacs-format-all-the-code/issues/19

Yeah, sorry about that. This problem seems to be only in the Doom Emacs fork of format-all. Unfortunately I can't help with it, as they made so many changes to the code that it's almost entirely different. I'll try to find a way to work together with them. Hope you'll find a solution to your problem, one way or another :)

authors: laishulu lassik

repo: lassik/emacs-format-all-the-code


text:
Add --stderr to StandardRB formatter command

Without this, Rubocop (which is what StandardRB uses under the hood)
outputs everything to stdout, including a line of several "="
characters. StandardRB is smart enough to filter a majority of this
output, but not that line of "=" characters, which then makes its way to
the formatted file in emacs' buffer. This fixe the issue.
Closes issue #156.

Thanks! LGTM

authors: fapapa lassik


text:
uncaught deployment error

I updated MUD and got a fun new error, so the world contract is undefined. Even so I am told that contract deployment was successful.

Yes I was! I needed to upgrade my type chain version.
Another concern this issue addresses is contract deployment says success even though it failed.

it also says success when deploying to prod lol

this is old and unclear if this is still an issue, so gonna close out for now

repo: latticexyz/mud


text:
chore: remove old/unused dev deps

Noticed these taking a while to install when wifi got shoddy.

Current dependencies on/for this PR:

main

PR #1068

PR #1067   👈

This comment was auto-generated by Graphite.


text:
feat(cli): add initialization libs to deploy

deploy.json already has "init" for systems.
But systems are contracts. Scripts are best run through libraries.
Example:
An expensive addItem function, which adds a game item prototype with all its properties. Say it costs 1mil gas per item. I have an initializer which adds 100 of those. 100mil gas exceeds the limit.

If the 100 adds are in a system contract, it will revert. And making a bunch of wrapper init systems is a really bad idea.
If the 100 adds are in a library, forge script can at least split it into several transactions. But also the real contract calls (component sets) use only a small portion of all that gas.

(this is a simplified edge case, my real use case is unfinished and more convoluted, but similar enough, e.g. InitEquipmentAffixSystem uses way more than the transaction gas limit)
I tested that it minimally works via a slightly modified emojimon, if you wanna just clone it.
Some concerns:

libs may not be the best name, open to suggestions
The whole idea of modifying LibDeploy may be a bit too hardcodey. Maybe having a user-controllable Deploy.sol would be best. But that's way beyond the scope of this simple PR. (#309 kinda goes in that direction a bit, making scripts more local)

Love this idea.
I wonder if it's worth adding a scripts directory (and follow the foundry *.s.sol naming scheme) to keep the initialization scripts/logic separate from the long-running logic (libs).

I wonder if it's worth adding a scripts directory (and follow the foundry *.s.sol naming scheme) to keep the initialization scripts/logic separate from the long-running logic (libs).

scripts is kinda like src, test, out, it should exist in the root (according to the defaults of foundry book, and my preference).
Something like Deploy.sol is a script (#311 is related), and should probably be Deploy.s.sol.
But I would prefer libraries that are used by scripts to still be inside src. They can be however kept in a separate dir from the other libs. This is mostly because #310 needs libs in src, but also allows them to be in arbitrary subfolders (for example src/init for init libs).

Can we add docs for this? Maybe here: https://mud.dev/guides/getting_started/#deployment

Just so I understand, this is meant to replace the current pattern of InitSystems, right?

Yep

Can we add docs for this? Maybe here: https://mud.dev/guides/getting_started/#deployment

I'll make a PR


text:
fix(store): replace windows path separator with posix path separator

followup to #851 - unfortunately I added the regex at the wrong place

self-approving to unblock myself and this change is not impacting any other platform than windows (which is broken without this change)


text:
Option to have Multiple of the same item, quantity parameter for new Item

Is it possible to use multiple of the same items, for adding them easily to addItems function.
Instead of the following:
$packager->addItems([
    new Item("Visitekaart 85x51mm sulfaatkarton", 85, 0.345, 51, 1.3)
])

Something more like this, with the addition of a quantity for example: 1000 (for 1000 of the same items)
$packager->addItems([
    new Item("Visitekaart 85x51mm sulfaatkarton", 85, 0.345, 51, 1.3, 1000)
])

Is it possible to use multiple of the same items, for adding them easily to addItems function. Instead of the following:
$packager->addItems([
    new Item("Visitekaart 85x51mm sulfaatkarton", 85, 0.345, 51, 1.3)
])

Something more like this, with the addition of a quantity for example: 1000 (for 1000 of the same items)
$packager->addItems([
    new Item("Visitekaart 85x51mm sulfaatkarton", 85, 0.345, 51, 1.3, 1000)
])

Yeah, it is possible. Going to update and add the feature soon.

authors: JeroenSteen latuconsinafr